mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
Fix a possible race condition of sdown detection if the
connection to master/slave/sentinel decames disconnected just after the last PONG and before the next PING.
This commit is contained in:
parent
c6e508856a
commit
e6d970534b
@ -3372,6 +3372,8 @@ void sentinelCheckSubjectivelyDown(sentinelRedisInstance *ri) {
|
||||
|
||||
if (ri->link->act_ping_time)
|
||||
elapsed = mstime() - ri->link->act_ping_time;
|
||||
else if (ri->link->disconnected)
|
||||
elapsed = mstime() - ri->link->last_avail_time;
|
||||
|
||||
/* Check if we are in need for a reconnection of one of the
|
||||
* links, because we are detecting low activity.
|
||||
|
Loading…
x
Reference in New Issue
Block a user