Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
diff --git a/requests/packages/urllib3/connectionpool.py b/requests/packages/urllib3/connectionpool.py
index 26f0176..31416d6 100644
--- a/requests/packages/urllib3/connectionpool.py
+++ b/requests/packages/urllib3/connectionpool.py
@@ -302,6 +302,8 @@ class HTTPConnectionPool(ConnectionPool, RequestMethods):
while True:
conn = old_pool.get(block=False)
if conn:
+ if conn.sock:
+ conn.sock.shutdown(socket.SHUT_RDWR)
conn.close()
except Empty:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.