mirror of
https://github.com/redis/redis.git
synced 2026-04-21 03:01:35 -04:00
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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user