From: Dennis Kanygin Date: Tue, 24 Sep 2013 18:07:19 +0000 (-0700) Subject: Deal with SSL errno 2 in timeout mode X-Git-Tag: twitter-1.10.2~6^2~4 X-Git-Url: https://jfr.im/git/z_archive/twitter.git/commitdiff_plain/a5ba0e8d7a47374c83d47ba84dc2935742effc27 Deal with SSL errno 2 in timeout mode --- diff --git a/twitter/stream.py b/twitter/stream.py index 4e25c2a..5ade0e5 100644 --- a/twitter/stream.py +++ b/twitter/stream.py @@ -59,7 +59,7 @@ class TwitterJSONIter(object): else: self.buf += sock.recv(1024) except SSLError as e: - if (not self.block) and (e.errno == 2): + if (not self.block) and (e.errno == 2) or self.timeout: # Apparently this means there was nothing in the socket buf pass else: