Chromium Code Reviews| Index: sync/tools/testserver/sync_testserver.py |
| diff --git a/sync/tools/testserver/sync_testserver.py b/sync/tools/testserver/sync_testserver.py |
| index b3ca64203043cac0040294efc69ebd98b3f917d3..73ce93f5e11ca8c2d8335c0881248f8483ee4f64 100755 |
| --- a/sync/tools/testserver/sync_testserver.py |
| +++ b/sync/tools/testserver/sync_testserver.py |
| @@ -27,13 +27,13 @@ import xmppserver |
| class SyncHTTPServer(testserver_base.ClientRestrictingServerMixIn, |
|
maniscalco
2015/01/06 18:39:59
What's the overall goal of this change? Does the
sigbjorn
2015/01/07 09:26:34
This allows for clean shutdown of the server. On L
|
| testserver_base.BrokenPipeHandlerMixIn, |
| - testserver_base.StoppableHTTPServer): |
| + BaseHTTPServer.HTTPServer): |
| """An HTTP server that handles sync commands.""" |
| def __init__(self, server_address, xmpp_port, request_handler_class): |
| - testserver_base.StoppableHTTPServer.__init__(self, |
| - server_address, |
| - request_handler_class) |
| + BaseHTTPServer.HTTPServer.__init__(self, |
| + server_address, |
| + request_handler_class) |
| self._sync_handler = chromiumsync.TestServer() |
| self._xmpp_socket_map = {} |
| self._xmpp_server = xmppserver.XmppServer( |
| @@ -92,7 +92,8 @@ class SyncHTTPServer(testserver_base.ClientRestrictingServerMixIn, |
| except: |
| xmpp_connection.handle_error() |
| - while True: |
| + self.stop = False |
|
pval...(no longer on Chromium)
2015/01/05 17:49:01
when/where can this be set to True?
sigbjorn
2015/01/06 08:11:27
This would be set to True from the calling thread.
maniscalco
2015/01/06 18:39:59
Maybe I'm missing something, why not create a Stop
sigbjorn
2015/01/07 09:26:34
The reason is compatibility. This is what Stoppabl
|
| + while not self.stop: |
| read_fds = [ self.fileno() ] |
| write_fds = [] |
| exceptional_fds = [] |