Fix the logic error in hostwd

In each period, the pmon_grace_loops is reduced two. In fact,
minus one is enough.

Closes-Bug: #1824983
Signed-off-by: wanghao <sxmatch1986@gmail.com>

Change-Id: I38ad97be5554f320d3a6e7366e39afe518ae7a92
This commit is contained in:
wanghao 2019-04-16 19:33:22 +08:00
parent 94126225d0
commit 4150f91ff0
2 changed files with 2 additions and 2 deletions

View File

@ -127,7 +127,7 @@ void hostw_service ( void )
ilog ("Did not receive expected message from PMON - first missed message\n");
}
ctrl->pmon_grace_loops--;
if ( ctrl->pmon_grace_loops <= 2 )
if ( ctrl->pmon_grace_loops )
{
ilog ("Did not receive expected message from PMON - %d more missed messages allowed\n",
ctrl->pmon_grace_loops);

View File

@ -2,7 +2,7 @@
[config] ; Configuration
hostwd_reboot_on_err = 1 ; host watchdog to reboot on detected failure
hostwd_failure_threshold = 5 ; number of # missed messages before action taken
hostwd_failure_threshold = 3 ; number of # missed messages before action taken
hostwd_use_kern_wd = 1 ; use kernel /dev/watchdog as backup watchdog
hostwd_console_path = /dev/console ; console on which to log extreme events, like
; notification of reboot