Merge "Allow multiple tcp adb connection to same device." am: 4818194a25 am: e060cdadc8 am: 2337e51f11

am: a4fa877840

Change-Id: Ide69733304ed0f1ca51cb36df3a2da42d7b2997a
This commit is contained in:
Elliott Hughes 2016-10-24 23:48:46 +00:00 committed by android-build-merger
commit dcdfd6dd7e

View file

@ -226,7 +226,8 @@ static void server_socket_thread(void* arg) {
D("server: new connection on fd %d", fd);
close_on_exec(fd);
disable_tcp_nagle(fd);
if (register_socket_transport(fd, "host", port, 1) != 0) {
std::string serial = android::base::StringPrintf("host-%d", fd);
if (register_socket_transport(fd, serial.c_str(), port, 1) != 0) {
adb_close(fd);
}
}