Shut mitmdump down gracefully on SIGTERM.

This is a hack at the moment, but needs must.
This commit is contained in:
Aldo Cortesi
2012-04-15 10:35:19 +12:00
parent e5c076ab4e
commit 2162ce1ae3
2 changed files with 12 additions and 1 deletions

View File

@@ -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: