mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
fix tests, don't double-add error'd flows
This commit is contained in:
parent
acd51befbb
commit
d3c30d9005
@ -1116,8 +1116,6 @@ class FlowMaster(controller.ServerMaster):
|
|||||||
flow.reply()
|
flow.reply()
|
||||||
|
|
||||||
def handle_tcp_error(self, flow):
|
def handle_tcp_error(self, flow):
|
||||||
if self.stream:
|
|
||||||
self.stream.add(flow)
|
|
||||||
self.add_event("Error in TCP connection to {}: {}".format(
|
self.add_event("Error in TCP connection to {}: {}".format(
|
||||||
repr(flow.server_conn.address),
|
repr(flow.server_conn.address),
|
||||||
flow.error
|
flow.error
|
||||||
|
@ -161,7 +161,9 @@ class HTTPProxyTest(ProxyTestBase):
|
|||||||
q = "get:'/p/%s'" % spec
|
q = "get:'/p/%s'" % spec
|
||||||
else:
|
else:
|
||||||
q = "get:'%s/p/%s'" % (self.server.urlbase, spec)
|
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):
|
def app(self, page):
|
||||||
if self.ssl:
|
if self.ssl:
|
||||||
|
Loading…
Reference in New Issue
Block a user