From dcb1f9a9e70a57a0466f749f9e8762965f210939 Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 11 Nov 2015 13:22:08 +0100 Subject: [PATCH] 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. --- tornado/curl_httpclient.py | 1 + 1 file changed, 1 insertion(+) 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, -- 2.47.2