adb: don't error in handle_host_request if we can't acquire a transport.
Host services are attempted after handle_host_request, which means that
failing to find a transport to give to handle_forward_request shouldn't
send an error over to the other end.
Bug: http://b/78294734
Test: `adb track-devices` with multiple devices connected
Change-Id: I46c89cc1894b51d48fea7d4e629b1d57f73e3fd6
(cherry picked from commit 78f133d7d46386a2215cd45836354260265ade26)
diff --git a/adb/adb.cpp b/adb/adb.cpp
index 70e083b..c791c7b 100644
--- a/adb/adb.cpp
+++ b/adb/adb.cpp
@@ -1222,7 +1222,7 @@
std::string error;
atransport* t = acquire_one_transport(type, serial, transport_id, nullptr, &error);
if (!t) {
- return SendFail(reply_fd, error);
+ return -1;
}
int ret = handle_forward_request(service, t, reply_fd);