summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author杨威 <[email protected]>2022-03-03 15:22:39 +0800
committer杨威 <[email protected]>2022-03-03 15:25:34 +0800
commit1c1a50665b6d012fce4124c23ae91e97acf73346 (patch)
treee01ef727b6918eb65e7f3d30170ebe8a39994db1
parent60a8b7db75b78e406f02ef55dcff789ea905c7a6 (diff)
🐞 fix(sapp_timer): 准备exit时,设置watchdog时间为600sv4.2.79
-rw-r--r--src/timer/sapp_timer.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/timer/sapp_timer.c b/src/timer/sapp_timer.c
index 606ccf0..33fef27 100644
--- a/src/timer/sapp_timer.c
+++ b/src/timer/sapp_timer.c
@@ -404,13 +404,7 @@ static void sapp_watch_dog(void)
}
/* ��Ҫ��sapp.servie ���������: WatchdogSec=10s */
- if(sd_watchdog_enabled(0, NULL))
- {
- if(sapp_global_val->individual_volatile->current_state == SAPP_STATE_READY_TO_EXIT)
- {
- sd_notify(0, check_result);
- }
- else
+ if (sd_watchdog_enabled(0, NULL))
{
for (thread_index = 0; thread_index < sapp_global_val->config.cpu.worker_threads; thread_index++)
{
@@ -432,7 +426,6 @@ static void sapp_watch_dog(void)
sd_notify(0, check_result);
}
- }
return;
}
@@ -457,8 +450,12 @@ void *sapp_time_event_thread(void *arg)
}
update_packet_io_status_sw = 1;
-
- while(SAPP_STATE_PROCESSING == sapp_global_val->individual_volatile->current_state || SAPP_STATE_READY_TO_EXIT == sapp_global_val->individual_volatile->current_state)
+ if(SAPP_STATE_READY_TO_EXIT == sapp_global_val->individual_volatile->current_state)
+ {
+ sd_notify(0, "WATCHDOG_USEC=600000000");
+ return;
+ }
+ while(SAPP_STATE_PROCESSING == sapp_global_val->individual_volatile->current_state)
{
ABBR_CURRENT_TIME = time(NULL);
/*