mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
netlib: always disconnect when using context manager
This commit is contained in:
parent
ced6fb4cf9
commit
7cb7d9ad32
@ -580,7 +580,9 @@ class _Connection(object):
|
||||
|
||||
@contextlib.contextmanager
|
||||
def _closer(client):
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
client.close()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user