summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMOON_CLJ <lijunli2598@gmail.com>2016-05-26 13:10:12 +0800
committerMOON_CLJ <lijunli2598@gmail.com>2016-05-26 13:10:12 +0800
commitaa578446bacd9b6565f40e7daf9eb14d3a6f6edd (patch)
treef3a7a58baef2d17fd1900b0a947e5e76652340bc /src
parent8c4f4d12d856e57534277c1737d7cb07890bbe63 (diff)
downloadredis-aa578446bacd9b6565f40e7daf9eb14d3a6f6edd.tar.gz
fix check when can't send the command to the promoted slave
Diffstat (limited to 'src')
-rw-r--r--src/sentinel.c2
1 files changed, 1 insertions, 1 deletions
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);