]> jfr.im git - z_archive/twitter.git/commitdiff
Deal with SSL errno 2 in timeout mode
authorDennis Kanygin <redacted>
Tue, 24 Sep 2013 18:07:19 +0000 (11:07 -0700)
committerDennis Kanygin <redacted>
Tue, 24 Sep 2013 18:07:19 +0000 (11:07 -0700)
twitter/stream.py

index 4e25c2a899199f12a2b0dc990d63b39c2ab5e5e6..5ade0e5ca6ac788fd779a09683ea7aa8c2e76077 100644 (file)
@@ -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: