Fix issue of not rescheduled keep-alive timer for Flow-Timer when ka_interval is zero/disabled

This commit is contained in:
Nanang Izzuddin 2022-01-13 14:55:50 +07:00
parent 23437d04f2
commit 4098159fe2
1 changed files with 3 additions and 1 deletions

View File

@ -2126,8 +2126,10 @@ static void keep_alive_timer_cb(pj_timer_heap_t *th, pj_timer_entry *te)
/* Check just in case keep-alive has been disabled. This shouldn't happen
* though as when ka_interval is changed this timer should have been
* cancelled.
*
* Also check if Flow Timer (rfc5626) is not set.
*/
if (acc->cfg.ka_interval == 0)
if (acc->cfg.ka_interval == 0 && acc->rfc5626_flowtmr == 0)
goto on_return;
ka_timer = acc->rfc5626_flowtmr ? acc->rfc5626_flowtmr :