From e6d970534b41825e9b32504b4e80d0039a389d28 Mon Sep 17 00:00:00 2001 From: Daniel Shih Date: Tue, 12 Jan 2016 17:06:47 +0800 Subject: 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. --- src/sentinel.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/sentinel.c') diff --git a/src/sentinel.c b/src/sentinel.c index a246a5b37..8a7ceac20 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -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. -- cgit v1.2.1