summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2020-04-18 02:47:11 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-04-18 02:47:11 +0000
commitff08a51a726d37379ee09901e57557a144f0192c (patch)
tree04be7083d727ec7bf34e841fae2149f2b63d847e
parent22cc277bfe4baf8668620541ec4a324ae2f514d3 (diff)
parentd81a805a4c410201adc19bd44328c8902ca20687 (diff)
downloadcore-ff08a51a726d37379ee09901e57557a144f0192c.tar.gz
Merge "adbconnection: silence logspam."
-rw-r--r--adb/libs/adbconnection/adbconnection_client.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/adb/libs/adbconnection/adbconnection_client.cpp b/adb/libs/adbconnection/adbconnection_client.cpp
index c13234218..7e1614835 100644
--- a/adb/libs/adbconnection/adbconnection_client.cpp
+++ b/adb/libs/adbconnection/adbconnection_client.cpp
@@ -140,7 +140,13 @@ AdbConnectionClientContext* adbconnection_client_new(
int rc = connect(ctx->control_socket_.get(), reinterpret_cast<sockaddr*>(&addr), addr_len);
if (rc != 0) {
- PLOG(ERROR) << "failed to connect to jdwp control socket";
+ if (errno == ECONNREFUSED) {
+ // On userdebug devices, every Java process is debuggable, so if adbd is explicitly turned
+ // off, this would spew enormous amounts of red-herring errors.
+ LOG(DEBUG) << "failed to connect to jdwp control socket, adbd not running?";
+ } else {
+ PLOG(ERROR) << "failed to connect to jdwp control socket";
+ }
return nullptr;
}