Skip to content

Commit e78d7a0

Browse files
authored
[sentinel] update master address if it changes. (#847)
Update the cached master_address if the Sentinels promote a new master.
1 parent afb3b81 commit e78d7a0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

redis/sentinel.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ def get_master_address(self):
103103
self.master_address = master_address
104104
elif master_address != self.master_address:
105105
# Master address changed, disconnect all clients in this pool
106+
self.master_address = master_address
106107
self.disconnect()
107108
return master_address
108109

0 commit comments

Comments
 (0)