MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / keepgoing

Method keepgoing

mitmproxy/addons/keepserving.py:22–32  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

20 )
21
22 def keepgoing(self) -> bool:
23 # Checking for proxyserver.active_connections is important for server replay,
24 # the addon may report that replay is finished but not the entire response has been sent yet.
25 # (https://github.com/mitmproxy/mitmproxy/issues/7569)
26 checks = [
27 "readfile.reading",
28 "replay.client.count",
29 "replay.server.count",
30 "proxyserver.active_connections",
31 ]
32 return any([ctx.master.commands.call(c) for c in checks])
33
34 def shutdown(self): # pragma: no cover
35 ctx.master.shutdown()

Callers 2

watchMethod · 0.95
test_keepservingFunction · 0.80

Calls 1

callMethod · 0.45

Tested by 1

test_keepservingFunction · 0.64