mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
.flush can raise NetlibDisconnect. This fixes a traceback found in fuzzing.
This commit is contained in:
parent
9ce2f473f6
commit
0811a9ebde
@ -253,7 +253,10 @@ class _Connection(object):
|
|||||||
# Closing the socket is not our task, therefore we don't call close then.
|
# Closing the socket is not our task, therefore we don't call close then.
|
||||||
if type(self.connection) != SSL.Connection:
|
if type(self.connection) != SSL.Connection:
|
||||||
if not getattr(self.wfile, "closed", False):
|
if not getattr(self.wfile, "closed", False):
|
||||||
|
try:
|
||||||
self.wfile.flush()
|
self.wfile.flush()
|
||||||
|
except NetLibDisconnect:
|
||||||
|
pass
|
||||||
|
|
||||||
self.wfile.close()
|
self.wfile.close()
|
||||||
self.rfile.close()
|
self.rfile.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user