netlib: always disconnect when using context manager

This commit is contained in:
Maximilian Hils 2016-06-06 15:10:03 -07:00
parent ced6fb4cf9
commit 7cb7d9ad32

View File

@ -580,8 +580,10 @@ class _Connection(object):
@contextlib.contextmanager
def _closer(client):
yield
client.close()
try:
yield
finally:
client.close()
class TCPClient(_Connection):