Fix timeout issue with python 2.5
authorJosh Roesslein <jroesslein@gmail.com>
Thu, 3 Sep 2009 15:52:27 +0000 (10:52 -0500)
committerJosh Roesslein <jroesslein@gmail.com>
Thu, 3 Sep 2009 15:52:27 +0000 (10:52 -0500)
tweepy/streaming.py

index 976707e2c503fbd982f13bdfcbdce0c045967f84..d7faf12c6f2bee15112d3f92a1a3542e1ff4cee0 100644 (file)
@@ -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: