A five-second default timeout is pretty ridiculous for streaming
authorRobin Houston <robin.houston@gmail.com>
Sat, 5 Mar 2011 16:16:39 +0000 (16:16 +0000)
committerRobin Houston <robin.houston@gmail.com>
Sat, 5 Mar 2011 16:16:39 +0000 (16:16 +0000)
searches, where Twitter will take longer than five seconds even to
send a response header.

My preferred default would be no timeout at all, but if we are to
have one then five minutes seems more reasonable than five seconds.

tweepy/streaming.py

index 73b632d95fdcfbffdc3c14e02a6776ad78791f9b..03a06ebef4db2af2b990b7115765a72719e97f60 100644 (file)
@@ -71,7 +71,7 @@ class Stream(object):
         self.auth = auth
         self.listener = listener
         self.running = False
-        self.timeout = options.get("timeout", 5.0)
+        self.timeout = options.get("timeout", 300.0)
         self.retry_count = options.get("retry_count")
         self.retry_time = options.get("retry_time", 10.0)
         self.snooze_time = options.get("snooze_time",  5.0)