From: Timo Ewalds Date: Wed, 22 Oct 2014 00:18:09 +0000 (-0400) Subject: Treat IncompleteRead as a disconnect or timeout, and reconnect. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c841a09a0a05b27979a5768274735d6fde184ea2;p=tweepy.git Treat IncompleteRead as a disconnect or timeout, and reconnect. --- diff --git a/tweepy/streaming.py b/tweepy/streaming.py index c292220..68532b7 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -182,7 +182,7 @@ class Stream(object): self.snooze_time = self.snooze_time_step self.listener.on_connect() self._read_loop(resp) - except (Timeout, ssl.SSLError) as exc: + except (Timeout, ssl.SSLError, requests.compat.IncompleteRead) as exc: # This is still necessary, as a SSLError can actually be # thrown when using Requests # If it's not time out treat it like any other exception