mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-04-21 02:16:26 +08:00
Close connection when flush fails
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user