]> git.ipfire.org Git - thirdparty/tornado.git/commit
Add timeout for requests in SimpleAsyncHTTPClient's queue.
authorCodeb Fan <codeb2cc@gmail.com>
Wed, 21 Aug 2013 06:56:29 +0000 (14:56 +0800)
committerCodeb Fan <codeb2cc@gmail.com>
Wed, 21 Aug 2013 06:56:29 +0000 (14:56 +0800)
commite48c794c3408ef5e8ca255297f3c5af3d0ca7a35
treea2feaece84615be69a7931431be9f989addfa932
parent8e7effdaefaddc5b61ba0aa6ff8e94f1422b6092
Add timeout for requests in SimpleAsyncHTTPClient's queue.

The connect_timeout and request_timeout in HTTPRequest only matter when
the _HTTPConnection get created. In heavy-loadded situation requests in
SimpleAsyncHTTPClient may have already timeouted before they pop out
from queue and get actual processed. This commit adds an timeout
callback for every request appended to SimpleAsyncHTTPClient's request
queue that cannot be processed immediately.
tornado/httpclient.py
tornado/simple_httpclient.py