diff options
| author | Jake <me@jh.gg> | 2020-05-20 11:16:11 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-20 11:16:11 -0700 |
| commit | e78d7a0f41b65adf119eba7e0d854da3c7c288f3 (patch) | |
| tree | 843d6add7916e020cb3dbe77605f63cddfaaef73 | |
| parent | afb3b81dca308307a17409a0a97bb52b070716b8 (diff) | |
| download | redis-py-e78d7a0f41b65adf119eba7e0d854da3c7c288f3.tar.gz | |
[sentinel] update master address if it changes. (#847)
Update the cached master_address if the Sentinels promote a new master.
| -rw-r--r-- | redis/sentinel.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/redis/sentinel.py b/redis/sentinel.py index ac5bf44..3857c88 100644 --- a/redis/sentinel.py +++ b/redis/sentinel.py @@ -103,6 +103,7 @@ class SentinelConnectionPool(ConnectionPool): self.master_address = master_address elif master_address != self.master_address: # Master address changed, disconnect all clients in this pool + self.master_address = master_address self.disconnect() return master_address |
