diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-04-15 10:35:19 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-04-15 10:35:19 +1200 |
commit | 2162ce1ae349d5a39364cc7e074a5b30ff12785c (patch) | |
tree | aae838a0a1be4ae62bf9c7e03e2cf687761c210b /libmproxy/dump.py | |
parent | e5c076ab4edee4c7989b72113dbddb9012ea6e64 (diff) | |
download | mitmproxy-2162ce1ae349d5a39364cc7e074a5b30ff12785c.tar.gz mitmproxy-2162ce1ae349d5a39364cc7e074a5b30ff12785c.tar.bz2 mitmproxy-2162ce1ae349d5a39364cc7e074a5b30ff12785c.zip |
Shut mitmdump down gracefully on SIGTERM.
This is a hack at the moment, but needs must.
Diffstat (limited to 'libmproxy/dump.py')
-rw-r--r-- | libmproxy/dump.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libmproxy/dump.py b/libmproxy/dump.py index 253a22d7..a797efbf 100644 --- a/libmproxy/dump.py +++ b/libmproxy/dump.py @@ -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: |