diff --git a/adb/client/adb_client.cpp b/adb/client/adb_client.cpp index 1959258b9850d1ee0b11166cf6ddd68184c28170..eda4b778a258ba94d189880aa15791f8904396bd 100644 --- a/adb/client/adb_client.cpp +++ b/adb/client/adb_client.cpp @@ -185,6 +185,11 @@ bool adb_kill_server() { return false; } + // The server might send OKAY, so consume that. + char buf[4]; + ReadFdExactly(fd, buf, 4); + // Now that no more data is expected, wait for socket orderly shutdown or error, indicating + // server death. ReadOrderlyShutdown(fd); return true; }