From: Timo Ewalds Date: Fri, 16 Aug 2013 22:01:14 +0000 (-0400) Subject: Set timeouts properly X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9fb3881128b35e776f9aed3b8932373142e710aa;p=tweepy.git Set timeouts properly --- diff --git a/tweepy/streaming.py b/tweepy/streaming.py index f6d37f4..78888c2 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -108,12 +108,11 @@ class Stream(object): break try: if self.scheme == "http": - conn = httplib.HTTPConnection(self.host) + conn = httplib.HTTPConnection(self.host, timeout=self.timeout) else: - conn = httplib.HTTPSConnection(self.host) + conn = httplib.HTTPSConnection(self.host, timeout=self.timeout) self.auth.apply_auth(url, 'POST', self.headers, self.parameters) conn.connect() - conn.sock.settimeout(self.timeout) conn.request('POST', self.url, self.body, headers=self.headers) resp = conn.getresponse() if resp.status != 200: