From 9f359069ba84651f2d95f92ce3b3d6988e0f8639 Mon Sep 17 00:00:00 2001 From: Jake Date: Fri, 24 Mar 2017 16:35:56 -0700 Subject: [PATCH] [sentinel] update master address if it changes. Otherwise we'll end up spamming the connection pool because each time the master is discovered, it'll trigger the disconnect of the pool - as `self.master_address` never gets updated. --- redis/sentinel.py | 1 + 1 file changed, 1 insertion(+) diff --git a/redis/sentinel.py b/redis/sentinel.py index 518fec582f..91231ed248 100644 --- a/redis/sentinel.py +++ b/redis/sentinel.py @@ -104,6 +104,7 @@ def get_master_address(self): 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