summaryrefslogtreecommitdiff
path: root/redis/connection.py
diff options
context:
space:
mode:
authorAndy McCurdy <andy@andymccurdy.com>2019-08-06 10:59:38 -0700
committerAndy McCurdy <andy@andymccurdy.com>2019-08-06 10:59:38 -0700
commit038e5ee019ecaa29b073a89e61585d404579beff (patch)
tree60aa92db2980aa10d8f5019dff046d332c663daa /redis/connection.py
parenta5ba696ed8aa3efbc709de4046a121a82a31392f (diff)
downloadredis-py-038e5ee019ecaa29b073a89e61585d404579beff.tar.gz
version 3.3.6, fixed a regression in 3.3.5 with pubsub timeouts3.3.6
Fixes #1200
Diffstat (limited to 'redis/connection.py')
-rwxr-xr-xredis/connection.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/redis/connection.py b/redis/connection.py
index 151d4d0..3a0ae65 100755
--- a/redis/connection.py
+++ b/redis/connection.py
@@ -182,6 +182,10 @@ class SocketBuffer(object):
if length is not None and length > marker:
continue
return True
+ except socket.timeout:
+ if raise_on_timeout:
+ raise
+ return False
except NONBLOCKING_EXCEPTIONS as ex:
# if we're in nonblocking mode and the recv raises a
# blocking error, simply return False indicating that
@@ -408,6 +412,10 @@ class HiredisParser(BaseParser):
# data was read from the socket and added to the buffer.
# return True to indicate that data was read.
return True
+ except socket.timeout:
+ if raise_on_timeout:
+ raise
+ return False
except NONBLOCKING_EXCEPTIONS as ex:
# if we're in nonblocking mode and the recv raises a
# blocking error, simply return False indicating that