Skip to content

Commit

Permalink
Merge pull request #498 from tewalds/incompleteread
Browse files Browse the repository at this point in the history
Treat IncompleteRead as a disconnect or timeout, and reconnect.
  • Loading branch information
Aaron1011 committed Oct 22, 2014
2 parents b64527a + c841a09 commit fae9091
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tweepy/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def _run(self):
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
Expand Down

0 comments on commit fae9091

Please sign in to comment.