提交 d7fae102 编写于 作者: X xionglei6

modify: critical limit

Signed-off-by: Nxionglei6 <xionglei6@huawei.com>
上级 fc9f339a
......@@ -253,12 +253,15 @@ static bool CalculateCrashTime(Service *service, int crashTimeLimit, int crashCo
if (service->crashCnt == 0) {
service->firstCrashTime = curTime;
++service->crashCnt;
if (service->crashCnt == crashCountLimit) {
return false;
}
} else if (difftime(curTime, service->firstCrashTime) > crashTimeLimit) {
service->firstCrashTime = curTime;
service->crashCnt = 1;
} else {
++service->crashCnt;
if (service->crashCnt > crashCountLimit) {
if (service->crashCnt >= crashCountLimit) {
return false;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册