mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-04-25 12:54:56 +08:00
Shut mitmdump down gracefully on SIGTERM.
This is a hack at the moment, but needs must.
This commit is contained in:
@@ -214,6 +214,11 @@ class DumpMaster(flow.FlowMaster):
|
||||
self._process_flow(f)
|
||||
return f
|
||||
|
||||
def shutdown(self):
|
||||
if self.o.wfile:
|
||||
self.wfile.fo.close()
|
||||
return flow.FlowMaster.shutdown(self)
|
||||
|
||||
# begin nocover
|
||||
def run(self):
|
||||
if self.o.rfile and not self.o.keepserving:
|
||||
|
||||
Reference in New Issue
Block a user