commit | 517037b90f4e061107985e0eb65c439962cd82f8 | [log] [tgz] |
---|---|---|
author | Josh Gao <jmgao@google.com> | Thu Feb 25 18:43:42 2016 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Thu Feb 25 18:43:42 2016 +0000 |
tree | cefe81ed131d4d36c1debc50bfcfc3f745a5df76 | |
parent | 0a38f3a79b12504c105acf078978b84262fc9280 [diff] | |
parent | c2e8e23e7264d3ec203e1e4bff681cb3b2f7327d [diff] |
Merge "adb: bail out if wait_for_device fails in send_shell_command."
diff --git a/adb/commandline.cpp b/adb/commandline.cpp index 8e76168..37d1146 100644 --- a/adb/commandline.cpp +++ b/adb/commandline.cpp
@@ -1106,8 +1106,9 @@ } fprintf(stderr,"- waiting for device -\n"); - adb_sleep_ms(1000); - wait_for_device("wait-for-device", transport_type, serial); + if (!wait_for_device("wait-for-device", transport_type, serial)) { + return 1; + } } int exit_code = read_and_dump(fd, use_shell_protocol);