secret
Created

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13
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:

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.