From 0012f92273137c171939552f328af17a093b548b Mon Sep 17 00:00:00 2001 From: Josh Roesslein Date: Thu, 3 Sep 2009 10:52:27 -0500 Subject: [PATCH] Fix timeout issue with python 2.5 --- tweepy/streaming.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tweepy/streaming.py b/tweepy/streaming.py index 976707e..d7faf12 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -46,7 +46,9 @@ class Stream(object): # quit if error count greater than retry count break try: - conn = httplib.HTTPConnection(self.host, timeout=self.timeout) + conn = httplib.HTTPConnection(self.host) + conn.connect() + conn.sock.settimeout(self.timeout) conn.request('POST', self.url, headers=headers) resp = conn.getresponse() if resp.status != 200: -- 2.25.1