Fix connection pooling bug: don't close before reading.
If the connection pool is full when a connection is returned, the connection was being closed before the response body was read. Now, the close() method is not explicitly called in put_http_connection; instead, the connection will be closed when the object is garbage collected.
|@@ -430,8 +430,11 @@ def put_http_connection(self, host, is_secure, connection):|
|- # gracefully fail in case of pool overflow|
|+ # Don't close the connection here, because the caller of|
|+ # _mexe, which calls this, has not read the response body|
|+ # yet. We'll just let the connection object close itself|
|+ # when it is freed.|
|host = '%s:%d' % (self.host, self.port)|