document choice of timeout value, refs #443

This commit is contained in:
Maximilian Hils 2015-01-09 17:17:12 +01:00
parent 40c28b79d1
commit e18294437c

View File

@ -108,6 +108,10 @@ class Master(object):
self.should_exit.clear()
self.server.start_slave(Slave, Channel(self.masterq, self.should_exit))
while not self.should_exit.is_set():
# Don't choose a very small timeout in Python 2:
# https://github.com/mitmproxy/mitmproxy/issues/443
# TODO: Lower the timeout value if we move to Python 3.
self.tick(self.masterq, 0.1)
self.shutdown()