Bug 1481699 - Rename ADBServer to ADBRequestHandler. r=jdescottes
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Mon, 13 Aug 2018 06:08:33 +0900
changeset 828758 671ad07b1645783c470c7417ab6e8cee4c7ccdb0
parent 828757 8413a2a9c0c17f93daa202ea9c7be49d2e491175
child 828759 147066d870a2457ca7bc1bb870e99783290526db
push id118704
push userbmo:rcaliman@mozilla.com
push dateMon, 13 Aug 2018 16:58:07 +0000
reviewersjdescottes
bugs1481699
milestone63.0a1
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')