From: Min RK Date: Wed, 11 Nov 2015 12:22:08 +0000 (+0100) Subject: CurlAsyncHTTPClient: free_list starvation if setup fails X-Git-Tag: v4.4.0b1~69^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcb1f9a9e70a57a0466f749f9e8762965f210939;p=thirdparty%2Ftornado.git CurlAsyncHTTPClient: free_list starvation if setup fails If `_curl_setup_request` fails, the failing curl instance would be permanently excluded from free_list, because `_finish` will never be called. Once this has happens `max_clients` times, no future request will ever complete. --- diff --git a/tornado/curl_httpclient.py b/tornado/curl_httpclient.py index 22f250232..6dadedd9f 100644 --- a/tornado/curl_httpclient.py +++ b/tornado/curl_httpclient.py @@ -221,6 +221,7 @@ class CurlAsyncHTTPClient(AsyncHTTPClient): # _process_queue() is called from # _finish_pending_requests the exceptions have # nowhere to go. + self._free_list.append(curl) callback(HTTPResponse( request=request, code=599,