mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-03 11:17:24 +00:00
Close connection when flush fails
This commit is contained in:
parent
826a1fdaa2
commit
be1377850e
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue