From b949f7c173f972157a8f279fdcab287d0c217fc1 Mon Sep 17 00:00:00 2001 From: omg-by <504094596@qq.com> Date: Sat, 18 Apr 2020 00:49:16 +0800 Subject: [PATCH] fix(sentinel): sentinel.running_scripts will always increase more times and not reset when trigger a always fail scripts, sentinel.running_scripts will increase ten times, however it only decrease one times onretry the maximum. and it will't reset, when it become SENTINEL_SCRIPT_MAX_RUNNING, sentinel don't trigger scripts. --- src/sentinel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sentinel.c b/src/sentinel.c index d091bf230..204a8b317 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -860,6 +860,7 @@ void sentinelCollectTerminatedScripts(void) { sj->pid = 0; sj->start_time = mstime() + sentinelScriptRetryDelay(sj->retry_num); + sentinel.running_scripts--; } else { /* Otherwise let's remove the script, but log the event if the * execution did not terminated in the best of the ways. */