summaryrefslogtreecommitdiff
path: root/redis/connection.py
diff options
context:
space:
mode:
Diffstat (limited to 'redis/connection.py')
-rw-r--r--redis/connection.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/redis/connection.py b/redis/connection.py
index e317e85..85b4a7c 100644
--- a/redis/connection.py
+++ b/redis/connection.py
@@ -97,6 +97,11 @@ class PythonConnection(BaseConnection):
if byte == '-':
if response.startswith('ERR '):
response = response[4:]
+ if response.startswith('LOADING '):
+ # If we're loading the dataset into memory, kill the socket
+ # so we re-initialize (and re-SELECT) next time.
+ self.disconnect()
+ response = response[8:]
raise ResponseError(response)
# single value
elif byte == '+':