mirror of
https://github.com/fluencelabs/redis
synced 2025-04-14 21:26:04 +00: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:
parent
8810167d13
commit
d920177f8d
@ -2069,6 +2069,7 @@ int sentinelSendHello(sentinelRedisInstance *ri) {
|
|||||||
|
|
||||||
/* Try to obtain our own IP address. */
|
/* Try to obtain our own IP address. */
|
||||||
if (anetSockName(ri->cc->c.fd,ip,sizeof(ip),NULL) == -1) return REDIS_ERR;
|
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. */
|
/* Format and send the Hello message. */
|
||||||
snprintf(payload,sizeof(payload),
|
snprintf(payload,sizeof(payload),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user