feature: consume all packets and free all sessions before exit

This commit is contained in:
luwenpeng
2024-08-27 16:19:20 +08:00
parent 11bf852c15
commit 79e70f7145
10 changed files with 103 additions and 96 deletions

View File

@@ -473,6 +473,19 @@ static int parse_schedule_options(toml_table_t *root, struct schedule_options *o
return -1;
}
ptr = toml_raw_in(table, "froce_session_expire_before_exit");
if (ptr == NULL)
{
CONFIG_LOG_ERROR("config file missing schedule->froce_session_expire_before_exit");
return -1;
}
opts->froce_session_expire_before_exit = atoll(ptr);
if (opts->froce_session_expire_before_exit != 0 && opts->froce_session_expire_before_exit != 1)
{
CONFIG_LOG_ERROR("config file invalid schedule->froce_session_expire_before_exit %ld, range [0, 1]", opts->froce_session_expire_before_exit);
return -1;
}
ptr = toml_raw_in(table, "free_expired_ip_frag_interval");
if (ptr == NULL)
{