From d3c30d9005e42a68cb3f5a5440f30f01f100cbec Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Wed, 11 May 2016 16:34:18 -0600 Subject: [PATCH] fix tests, don't double-add error'd flows --- mitmproxy/flow.py | 2 -- test/mitmproxy/tservers.py | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mitmproxy/flow.py b/mitmproxy/flow.py index 1d05d4bb9..77ed87470 100644 --- a/mitmproxy/flow.py +++ b/mitmproxy/flow.py @@ -1116,8 +1116,6 @@ class FlowMaster(controller.ServerMaster): flow.reply() def handle_tcp_error(self, flow): - if self.stream: - self.stream.add(flow) self.add_event("Error in TCP connection to {}: {}".format( repr(flow.server_conn.address), flow.error diff --git a/test/mitmproxy/tservers.py b/test/mitmproxy/tservers.py index c9d68cfd0..a1e9c7139 100644 --- a/test/mitmproxy/tservers.py +++ b/test/mitmproxy/tservers.py @@ -161,7 +161,9 @@ class HTTPProxyTest(ProxyTestBase): q = "get:'/p/%s'" % spec else: q = "get:'%s/p/%s'" % (self.server.urlbase, spec) - return p.request(q) + resp = p.request(q) + p.close() + return resp def app(self, page): if self.ssl: