Commit c0d72293 authored by antirez's avatar antirez
Browse files

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

parent dfbd9c5a
...@@ -1626,6 +1626,7 @@ void sentinelRefreshInstanceInfo(sentinelRedisInstance *ri, const char *info) { ...@@ -1626,6 +1626,7 @@ void sentinelRefreshInstanceInfo(sentinelRedisInstance *ri, const char *info) {
/* Handle slaves replicating to a different master address. */ /* Handle slaves replicating to a different master address. */
if ((ri->flags & SRI_SLAVE) && !sentinel.tilt && if ((ri->flags & SRI_SLAVE) && !sentinel.tilt &&
role == SRI_SLAVE &&
(ri->slave_master_port != ri->master->addr->port || (ri->slave_master_port != ri->master->addr->port ||
strcasecmp(ri->slave_master_host,ri->master->addr->ip))) strcasecmp(ri->slave_master_host,ri->master->addr->ip)))
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment