From be1377850ed85506a1b0fb4eeca2bd686cdc4b71 Mon Sep 17 00:00:00 2001 From: Matthias Urlichs Date: Wed, 26 Jun 2013 15:00:33 +0200 Subject: Close connection when flush fails --- libmproxy/proxy.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libmproxy') 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 -- cgit v1.2.3