Merge "adb: Avoid waiting for emulator connections" am: 8ef8d1eb6b
am: 142eeae546
Change-Id: I4d9a888b7d7521ad0428aa33af6d24143818162b
diff --git a/adb/transport.cpp b/adb/transport.cpp
index 706aee6..fa7cc8c 100644
--- a/adb/transport.cpp
+++ b/adb/transport.cpp
@@ -1040,6 +1040,11 @@
auto waitable = t->connection_waitable();
register_transport(t);
+ if (local == 1) {
+ // Do not wait for emulator transports.
+ return 0;
+ }
+
return waitable->WaitForConnection(std::chrono::seconds(10)) ? 0 : -1;
}