summaryrefslogtreecommitdiff
path: root/redis
diff options
context:
space:
mode:
Diffstat (limited to 'redis')
-rw-r--r--redis/__init__.py2
-rwxr-xr-xredis/connection.py8
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