From 9fb3881128b35e776f9aed3b8932373142e710aa Mon Sep 17 00:00:00 2001 From: Timo Ewalds Date: Fri, 16 Aug 2013 18:01:14 -0400 Subject: [PATCH] Set timeouts properly --- tweepy/streaming.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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: -- 2.25.1