From aa578446bacd9b6565f40e7daf9eb14d3a6f6edd Mon Sep 17 00:00:00 2001 From: MOON_CLJ Date: Thu, 26 May 2016 13:10:12 +0800 Subject: [PATCH] fix check when can't send the command to the promoted slave --- src/sentinel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sentinel.c b/src/sentinel.c index 0d1eb78aa..d84ffb088 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -3996,7 +3996,7 @@ void sentinelFailoverSendSlaveOfNoOne(sentinelRedisInstance *ri) { /* We can't send the command to the promoted slave if it is now * disconnected. Retry again and again with this state until the timeout * is reached, then abort the failover. */ - if (ri->link->disconnected) { + if (ri->promoted_slave->link->disconnected) { if (mstime() - ri->failover_state_change_time > ri->failover_timeout) { sentinelEvent(LL_WARNING,"-failover-abort-slave-timeout",ri,"%@"); sentinelAbortFailover(ri);