Merge "Only use Timeout if we don't have a final_resp"

This commit is contained in:
Jenkins
2016-07-05 12:57:29 +00:00
committed by Gerrit Code Review

View File

@@ -1471,15 +1471,15 @@ class Putter(object):
:returns: HTTPResponse :returns: HTTPResponse
:raises: Timeout if the response took too long :raises: Timeout if the response took too long
""" """
with Timeout(timeout): # don't do this update of self.resp if the Expect response during
# don't do this update of self.resp if the Expect response during # connect() was actually a final response
# conenct() was actually a final response if not self.final_resp:
if not self.final_resp: with Timeout(timeout):
if informational: if informational:
self.resp = self.conn.getexpect() self.resp = self.conn.getexpect()
else: else:
self.resp = self.conn.getresponse() self.resp = self.conn.getresponse()
return self.resp return self.resp
def spawn_sender_greenthread(self, pool, queue_depth, write_timeout, def spawn_sender_greenthread(self, pool, queue_depth, write_timeout,
exception_handler): exception_handler):