summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES4
-rw-r--r--redis/sentinel.py4
2 files changed, 6 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index 54288c4..0f19282 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+* 2.10.1
+ * Fixed a bug where Sentinel connections to a server that's no longer a
+ master and receives a READONLY error will disconnect and reconnect to
+ the master.
* 2.10.0
* Discontinuted support for Python 2.5. Upgrade. You'll be happier.
* The HiRedis parser will now properly raise ConnectionErrors.
diff --git a/redis/sentinel.py b/redis/sentinel.py
index 0479690..2f30062 100644
--- a/redis/sentinel.py
+++ b/redis/sentinel.py
@@ -50,9 +50,9 @@ class SentinelManagedConnection(Connection):
continue
raise SlaveNotFoundError # Never be here
- def send_command(self, *args):
+ def read_response(self):
try:
- super(SentinelManagedConnection, self).send_command(*args)
+ return super(SentinelManagedConnection, self).read_response()
except ReadOnlyError:
if self.connection_pool.is_master:
# When talking to a master, a ReadOnlyError when likely