From: Josh Roesslein Date: Thu, 3 Sep 2009 15:52:27 +0000 (-0500) Subject: Fix timeout issue with python 2.5 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0012f92273137c171939552f328af17a093b548b;p=tweepy.git Fix timeout issue with python 2.5 --- 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: