make socks.py and http.py shut themselves down after a timeout of inactivity (maybe that will fix the problem of them lingering, stalling tests). fix some issues in run_regression_tests.py
This commit is contained in:
@@ -13,6 +13,10 @@ import sys
|
||||
|
||||
class MyTCPServer(ThreadingTCPServer):
|
||||
allow_reuse_address = True
|
||||
|
||||
def handle_timeout(self):
|
||||
raise Exception('timeout')
|
||||
|
||||
CLOSE = object()
|
||||
|
||||
logging.basicConfig(stream=sys.stderr, level=logging.INFO)
|
||||
@@ -252,4 +256,6 @@ if __name__ == '__main__':
|
||||
|
||||
info('Listening on port %d...' % listen_port)
|
||||
server = MyTCPServer(('localhost', listen_port), SocksHandler)
|
||||
server.serve_forever()
|
||||
server.timeout = 50
|
||||
while True:
|
||||
server.handle_request()
|
||||
|
Reference in New Issue
Block a user