diff options
author | Andy McCurdy <andy@andymccurdy.com> | 2019-08-06 10:59:38 -0700 |
---|---|---|
committer | Andy McCurdy <andy@andymccurdy.com> | 2019-08-06 10:59:38 -0700 |
commit | 038e5ee019ecaa29b073a89e61585d404579beff (patch) | |
tree | 60aa92db2980aa10d8f5019dff046d332c663daa /redis | |
parent | a5ba696ed8aa3efbc709de4046a121a82a31392f (diff) | |
download | redis-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')
-rw-r--r-- | redis/__init__.py | 2 | ||||
-rwxr-xr-x | redis/connection.py | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/redis/__init__.py b/redis/__init__.py index 66ef979..6200d4d 100644 --- a/redis/__init__.py +++ b/redis/__init__.py @@ -29,7 +29,7 @@ def int_or_str(value): return value -__version__ = '3.3.5' +__version__ = '3.3.6' VERSION = tuple(map(int_or_str, __version__.split('.'))) __all__ = [ 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 |