Bug 1481699 - Send back 'OKAY' to the client when the adb server received 'kill-server' command. r=jdescottes
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Mon, 13 Aug 2018 06:08:34 +0900
changeset 486315 147066d870a2457ca7bc1bb870e99783290526db
parent 486314 671ad07b1645783c470c7417ab6e8cee4c7ccdb0
child 486316 4e70c4d1dfc30b07f31e3315eb50eb3e93715b5a
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1481699
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1481699 - Send back 'OKAY' to the client when the adb server received 'kill-server' command. r=jdescottes Because the genuine adb binary does it [1]. And doing it before shutdown thread is created to make sure it's sent to the client. [1] https://android.googlesource.com/platform/system/core/+/4039051d6ddb02324204930fb86d9d0fe405b3fb/adb/adb.cpp#1055 Differential Revision: https://phabricator.services.mozilla.com/D3168
devtools/shared/adb/test/adb.py
--- a/devtools/shared/adb/test/adb.py
+++ b/devtools/shared/adb/test/adb.py
@@ -34,18 +34,19 @@ class ADBRequestHandler(SocketServer.Bas
 
     def handle(self):
         while True:
             data = self.request.recv(4096)
             if 'kill-server' in data:
                 def shutdown(server):
                     server.shutdown()
                     thread.exit()
+                self.sendData('')
+                self.request.close()
                 thread.start_new_thread(shutdown, (server, ))
-                self.request.close()
                 break
             elif 'host:version' in data:
                 self.sendData('001F')
                 self.request.close()
                 break
             elif 'host:track-devices' in data:
                 self.sendData('1234567890\tdevice')
                 break