Merge "Allow multiple tcp adb connection to same device."

am: 4818194a25

Change-Id: Id2b6bc99479e94cd94154ca194985f65df7e2afa
This commit is contained in:
Elliott Hughes 2016-10-24 23:36:44 +00:00 committed by android-build-merger
commit e060cdadc8
1 changed files with 2 additions and 1 deletions

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);
}
}