Kaydet (Commit) 91b1a931 authored tarafından Sam Alba's avatar Sam Alba

Merge pull request #352 from bfirsh/fix-tls-sockets-being-closed-when-attaching

Stop TLS sockets being closed when attaching
......@@ -259,9 +259,11 @@ class Client(requests.Session):
def _get_raw_response_socket(self, response):
self._raise_for_status(response)
if six.PY3:
return response.raw._fp.fp.raw._sock
sock = response.raw._fp.fp.raw._sock
else:
return response.raw._fp.fp._sock
sock = response.raw._fp.fp._sock
sock._response = response
return sock
def _stream_helper(self, response):
"""Generator for data coming from a chunked-encoded HTTP response."""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment