diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2016-06-12 12:15:00 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2016-06-14 14:32:18 +1200 |
commit | e6fd98bb72e5dee899678c0a382c832580f75e82 (patch) | |
tree | 04e5008ce1b27cd8165678b4eed4542d7620d7f7 /pathod | |
parent | ccf4723505935f759c1bff5c5cc7d6d986726422 (diff) | |
download | mitmproxy-e6fd98bb72e5dee899678c0a382c832580f75e82.tar.gz mitmproxy-e6fd98bb72e5dee899678c0a382c832580f75e82.tar.bz2 mitmproxy-e6fd98bb72e5dee899678c0a382c832580f75e82.zip |
Start rolling out leak detection in netlib
Diffstat (limited to 'pathod')
-rw-r--r-- | pathod/test.py | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/pathod/test.py b/pathod/test.py index 3ba541b1..4992945d 100644 --- a/pathod/test.py +++ b/pathod/test.py @@ -7,10 +7,6 @@ from . import pathod from netlib import basethread -class TimeoutError(Exception): - pass - - class Daemon: IFACE = "127.0.0.1" @@ -45,15 +41,7 @@ class Daemon: return self.logfp.getvalue() def wait_for_silence(self, timeout=5): - start = time.time() - while 1: - if time.time() - start >= timeout: - raise TimeoutError( - "%s service threads still alive" % - self.thread.server.handler_counter.count - ) - if self.thread.server.handler_counter.count == 0: - return + self.thread.server.wait_for_silence(timeout=timeout) def expect_log(self, n, timeout=5): l = [] |