Sentinel: fix conditional to only affect slaves with wrong master.

This commit is contained in:
antirez 2013-11-14 10:23:05 +01:00
parent dfbd9c5aeb
commit c0d7229364

View File

@ -1626,6 +1626,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)))
{