projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cfc19b4
)
urllib3 update
author
Kenneth Reitz
<me@kennethreitz.com>
Mon, 26 Sep 2011 02:59:20 +0000
(22:59 -0400)
committer
Kenneth Reitz
<me@kennethreitz.com>
Mon, 26 Sep 2011 02:59:20 +0000
(22:59 -0400)
requests/packages/urllib3/connectionpool.py
patch
|
blob
|
history
diff --git
a/requests/packages/urllib3/connectionpool.py
b/requests/packages/urllib3/connectionpool.py
index 95e3dd4ad8f7ec5cde56632f44d303c5922caaa2..add6fbc72f659d607c586a5c256e1685a652f71b 100644
(file)
--- a/
requests/packages/urllib3/connectionpool.py
+++ b/
requests/packages/urllib3/connectionpool.py
@@
-284,6
+284,7
@@
class HTTPConnectionPool(ConnectionPool):
httplib_response = self._make_request(conn, method, url,
timeout=timeout,
body=body, headers=headers)
+
# Import httplib's response into our own wrapper object
response = HTTPResponse.from_httplib(httplib_response,
pool=self,
@@
-309,7
+310,8
@@
class HTTPConnectionPool(ConnectionPool):
finally:
if release_conn:
# Put the connection back to be reused
- self._put_conn(conn)
+ response.release_conn() # Equivalent to self._put_conn(conn) but
+ # tracks release state.
if not conn:
log.warn("Retrying (%d attempts remain) after connection "