From 0eeb0a0782b18a19e6d724068faba97f32054235 Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 14 Nov 2013 10:23:05 +0100 Subject: [PATCH] Sentinel: fix conditional to only affect slaves with wrong master. --- src/sentinel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sentinel.c b/src/sentinel.c index a1660b0b..f225dc76 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -1628,6 +1628,7 @@ void sentinelRefreshInstanceInfo(sentinelRedisInstance *ri, const char *info) { /* Handle slaves replicating to a different master address. */ if ((ri->flags & SRI_SLAVE) && !sentinel.tilt && + role == SRI_SLAVE && (ri->slave_master_port != ri->master->addr->port || strcasecmp(ri->slave_master_host,ri->master->addr->ip))) { -- GitLab