diff options
| author | Aldo Cortesi <aldo@nullcube.com> | 2013-12-08 15:26:30 +1300 |
|---|---|---|
| committer | Aldo Cortesi <aldo@nullcube.com> | 2013-12-08 15:26:30 +1300 |
| commit | 4840c6b3bf5c9e992895f9c3117ceddca4c0cc33 (patch) | |
| tree | f1c609036bbc56d9d6c568c566c40dae6f702724 | |
| parent | bae2b6ea36f8438103f8e9dcc20eb6b9183fb527 (diff) | |
| download | mitmproxy-4840c6b3bf5c9e992895f9c3117ceddca4c0cc33.tar.gz mitmproxy-4840c6b3bf5c9e992895f9c3117ceddca4c0cc33.tar.bz2 mitmproxy-4840c6b3bf5c9e992895f9c3117ceddca4c0cc33.zip | |
Fix race condition in test suite.
| -rw-r--r-- | netlib/tcp.py | 1 | ||||
| -rw-r--r-- | test/test_tcp.py | 3 |
2 files changed, 0 insertions, 4 deletions
diff --git a/netlib/tcp.py b/netlib/tcp.py index b3be43d6..5a07c013 100644 --- a/netlib/tcp.py +++ b/netlib/tcp.py @@ -354,7 +354,6 @@ class BaseHandler: except (socket.error, SSL.Error): # Socket probably already closed pass - self.connection.close() diff --git a/test/test_tcp.py b/test/test_tcp.py index f45acb00..220ece15 100644 --- a/test/test_tcp.py +++ b/test/test_tcp.py @@ -80,7 +80,6 @@ class FinishFailHandler(tcp.BaseHandler): v = self.rfile.readline() self.wfile.write(v) self.wfile.flush() - o = mock.MagicMock() self.wfile.close() self.rfile.close() self.close = mock.MagicMock(side_effect=socket.error) @@ -99,8 +98,6 @@ class TestFinishFail(test.ServerTestBase): c.wfile.write("foo\n") c.wfile.flush() c.rfile.read(4) - h = self.last_handler - h.finish() class TestDisconnect(test.ServerTestBase): |
