aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/proxy.py
diff options
context:
space:
mode:
authorMatthias Urlichs <matthias@urlichs.de>2013-06-26 15:00:33 +0200
committerMatthias Urlichs <matthias@urlichs.de>2013-06-26 15:02:55 +0200
commitbe1377850ed85506a1b0fb4eeca2bd686cdc4b71 (patch)
tree96f8669aa7233caee0ae954ce056beccd7b2e536 /libmproxy/proxy.py
parent826a1fdaa264a0dfaafe238fec96170c699ca7ae (diff)
downloadmitmproxy-be1377850ed85506a1b0fb4eeca2bd686cdc4b71.tar.gz
mitmproxy-be1377850ed85506a1b0fb4eeca2bd686cdc4b71.tar.bz2
mitmproxy-be1377850ed85506a1b0fb4eeca2bd686cdc4b71.zip
Close connection when flush fails
Diffstat (limited to 'libmproxy/proxy.py')
-rw-r--r--libmproxy/proxy.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py
index 283072ab..69873a38 100644
--- a/libmproxy/proxy.py
+++ b/libmproxy/proxy.py
@@ -88,6 +88,9 @@ class ServerConnection(tcp.TCPClient):
def terminate(self):
try:
self.wfile.flush()
+ except IOError:
+ pass
+ try:
self.connection.close()
except IOError:
pass