summaryrefslogtreecommitdiff
path: root/redis/sentinel.py
diff options
context:
space:
mode:
authorJonathan Frawley <jmf@9lines.org>2014-09-18 11:49:14 +0100
committerJonathan Frawley <jmf@9lines.org>2014-09-18 11:49:14 +0100
commit0451d8d92e15ad08e7fcf9d4b3c0428f62c1a6f8 (patch)
tree6913a341552e394eb9f2274572ba8c14abf6c7a5 /redis/sentinel.py
parent499311af2046bd99f1ae680a2bad156263affaa1 (diff)
downloadredis-py-0451d8d92e15ad08e7fcf9d4b3c0428f62c1a6f8.tar.gz
Passing is_master flag through on reset
- is_master is not passed through when recreating the ConnectionPool. - This was causing unexpected behaviour where we would specifiy that we wish to connect to the slave, but the master would be read from instead.
Diffstat (limited to 'redis/sentinel.py')
-rw-r--r--redis/sentinel.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/redis/sentinel.py b/redis/sentinel.py
index 2f30062..be10180 100644
--- a/redis/sentinel.py
+++ b/redis/sentinel.py
@@ -129,6 +129,7 @@ class SentinelConnectionPool(ConnectionPool):
self.disconnect()
self.reset()
self.__init__(self.service_name, self.sentinel_manager,
+ is_master=self.is_master,
connection_class=self.connection_class,
max_connections=self.max_connections,
**self.connection_kwargs)