Bug 1481699 - Rename ADBServer to ADBRequestHandler. r=jdescottes
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Mon, 13 Aug 2018 06:08:33 +0900
changeset 431201 671ad07b1645783c470c7417ab6e8cee4c7ccdb0
parent 431200 8413a2a9c0c17f93daa202ea9c7be49d2e491175
child 431202 147066d870a2457ca7bc1bb870e99783290526db
push id106384
push userhikezoe@mozilla.com
push dateMon, 13 Aug 2018 11:58:00 +0000
treeherdermozilla-inbound@784bc6605eeb [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 - Rename ADBServer to ADBRequestHandler. r=jdescottes Since it's actually a child of SocketServer.BaseRequestHandler. Differential Revision: https://phabricator.services.mozilla.com/D3167
devtools/shared/adb/test/adb.py
--- a/devtools/shared/adb/test/adb.py
+++ b/devtools/shared/adb/test/adb.py
@@ -13,17 +13,17 @@ import os
 import socket
 import SocketServer
 import sys
 import thread
 
 HOST = '127.0.0.1'
 PORT = 5037
 
-class ADBServer(SocketServer.BaseRequestHandler):
+class ADBRequestHandler(SocketServer.BaseRequestHandler):
     def sendData(self, data):
         header = 'OKAY%04x' % len(data)
         all_data = header + data
         total_length = len(all_data)
         sent_length = 0
         # Make sure send all data to the client.
         # Though the data length here is pretty small but sometimes when the
         # client is on heavy load (e.g. MOZ_CHAOSMODE) we can't send the whole
@@ -56,17 +56,17 @@ if len(sys.argv) == 2:
         if os.fork() > 0:
             sys.exit(0)
         os.setsid()
         if os.fork() > 0:
             sys.exit(0)
 
         # Create a SocketServer with 'False' for bind_and_activate to set
         # allow_reuse_address before binding.
-        server = SocketServer.TCPServer((HOST, PORT), ADBServer, False)
+        server = SocketServer.TCPServer((HOST, PORT), ADBRequestHandler, False)
         server.allow_reuse_address = True
         server.server_bind()
         server.server_activate()
         server.serve_forever()
     elif sys.argv[1] == 'kill-server':
         sock = socket.socket()
         sock.connect((HOST, PORT))
         sock.send('kill-server')