From: Ben Darnell Date: Sat, 13 Apr 2013 21:20:07 +0000 (-0400) Subject: Ignore negative return values from CurlMulti.timeout. X-Git-Tag: v3.1.0~123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4059df20998f5364d398cdc4ac0057c744cda380;p=thirdparty%2Ftornado.git Ignore negative return values from CurlMulti.timeout. pycurl has a wraparound bug that can turn very large timeouts into negative numbers. Closes #712. --- diff --git a/tornado/curl_httpclient.py b/tornado/curl_httpclient.py index c5f08df4f..c0fb4a746 100644 --- a/tornado/curl_httpclient.py +++ b/tornado/curl_httpclient.py @@ -172,7 +172,7 @@ class CurlAsyncHTTPClient(AsyncHTTPClient): # libcurl is ready. After each timeout, resync the scheduled # timeout with libcurl's current state. new_timeout = self._multi.timeout() - if new_timeout != -1: + if new_timeout >= 0: self._set_timeout(new_timeout) def _handle_force_timeout(self):