Merge "(Mostly) revert "Cleanup session on delete""
This commit is contained in:
commit
b13712949f
@ -443,10 +443,12 @@ class HTTPConnection(object):
|
||||
if timeout:
|
||||
self.requests_args['timeout'] = timeout
|
||||
|
||||
if not six.PY2:
|
||||
def __del__(self):
|
||||
"""Cleanup resources other than memory"""
|
||||
if self.request_session:
|
||||
# The session we create must be closed to free up file descriptors
|
||||
# The session we create must be closed to free up
|
||||
# file descriptors
|
||||
try:
|
||||
self.request_session.close()
|
||||
finally:
|
||||
|
Loading…
Reference in New Issue
Block a user