From ef27fd5ea11bcfd2207879aa4670d57df5f321fd Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sat, 1 Jan 2011 15:20:29 +0000 Subject: [PATCH] there is a huge problem with urllib2 connections that sockets are left opened causing problems with lots of disposable connections used (like in --threads) (http://mail.python.org/pipermail/python-bugs-list/2007-January/036873.html, http://mail.python.org/pipermail/python-bugs-list/2007-January/036873.html) --- lib/request/connect.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/request/connect.py b/lib/request/connect.py index fe1fbfb92..e7dde49c1 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -240,6 +240,7 @@ class Connect: # Explicit closing of connection object if not conf.keepAlive: try: + conn.fp._sock.close() conn.close() except Exception, msg: warnMsg = "problem occured during connection closing ('%s')" % msg