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 64c8de8657
commit 0eeb0a0782

View File

@ -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)))
{