From a2adfa1f997e6ad731c0d8da81dfd9831e4d4999 Mon Sep 17 00:00:00 2001 From: Casey Muller Date: Wed, 27 Jan 2010 23:46:12 -0800 Subject: [PATCH] allow connect and request timeouts of zero --- tornado/httpclient.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tornado/httpclient.py b/tornado/httpclient.py index 23496d7b..963aa91a 100644 --- a/tornado/httpclient.py +++ b/tornado/httpclient.py @@ -257,7 +257,7 @@ class AsyncHTTPClient(object): class HTTPRequest(object): def __init__(self, url, method="GET", headers={}, body=None, auth_username=None, auth_password=None, - connect_timeout=None, request_timeout=None, + connect_timeout=20.0, request_timeout=20.0, if_modified_since=None, follow_redirects=True, max_redirects=5, user_agent=None, use_gzip=True, network_interface=None, streaming_callback=None): @@ -273,8 +273,8 @@ class HTTPRequest(object): self.body = body self.auth_username = _utf8(auth_username) self.auth_password = _utf8(auth_password) - self.connect_timeout = connect_timeout or 20.0 - self.request_timeout = request_timeout or 20.0 + self.connect_timeout = connect_timeout + self.request_timeout = request_timeout self.follow_redirects = follow_redirects self.max_redirects = max_redirects self.user_agent = user_agent