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.
This commit is contained in:
antirez 2013-11-21 11:35:50 +01:00
parent 8810167d13
commit d920177f8d

View File

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