From d920177f8ddadc4af7fbc8a02438340eea5ca1f3 Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 21 Nov 2013 11:35:50 +0100 Subject: [PATCH] Sentinel: check for disconnected links in sentinelSendHello(). Does not fix any bug as the test is performed by the caller, but better to have the check. --- src/sentinel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sentinel.c b/src/sentinel.c index 9ab91d0b..b963da10 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -2069,6 +2069,7 @@ int sentinelSendHello(sentinelRedisInstance *ri) { /* Try to obtain our own IP address. */ if (anetSockName(ri->cc->c.fd,ip,sizeof(ip),NULL) == -1) return REDIS_ERR; + if (ri->flags & SRI_DISCONNECTED) return; /* Format and send the Hello message. */ snprintf(payload,sizeof(payload),