Files
jami-daemon/contrib/src/pjproject/0019-resort-check-list-after-adding-prflx.patch
Mohamed Chibani 6d4630bfc2 ICE: flush timer heap when destroying ICE instance
When requesting destruction of ice session and stream
transport instances from PJNATH, some operation will be
done asynchronously through scheduled timers. If not
properly handled, the timer heap will still contain
timer entries when the timer heap and the IO queueu are
destroyed.
Now, the timer heap is given more time to flush the
remaining timer entries before the IO queue and the
timer heap are destructed.
The timer heap may still contain timer entries if
PJNATH does not process all the timers within the
givent max time (currently set to 3s).

Gitlab: #637

Change-Id: I5ef2fe9d824e8b57191a51fac8f9e53e0e626fcd
2021-09-28 20:53:37 -04:00

23 lines
662 B
Diff

pjnath/src/pjnath/ice_session.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pjnath/src/pjnath/ice_session.c b/pjnath/src/pjnath/ice_session.c
index 503cbfd91..f060aaa9c 100644
--- a/pjnath/src/pjnath/ice_session.c
+++ b/pjnath/src/pjnath/ice_session.c
@@ -4138,7 +4138,11 @@ static void handle_incoming_check(pj_ice_sess *ice,
LOG4((ice->obj_name, "New triggered check added: %d",
ice->clist.count));
pj_log_push_indent();
+
perform_check(ice, &ice->clist, ice->clist.count++, nominate);
+ /* Re-sort the list because of the newly added pair. */
+ sort_checklist(ice, &ice->clist);
+
pj_log_pop_indent();
} else {
--
2.25.1