baresip/re

ice_connchk_h gets called multiple times

pitti98 opened this issue · 1 comments

The problem seems to be in ice/connchk.c/pace_next().

What I see is a long call stack on the first call to my ice_connchk_h handler:

icem_checklist_update
pace_next
do_check
icem_conncheck_schedule_check
pace_next
do_check
icem_conncheck_schedule_check
... repeating for as many candidates as there are in the remote SDP

In pace_next(), if icem_conncheck_schedule_check() already determines that the checklist is done, the handler gets called. But the call to icem_checklist_update() a few lines after that does it all again, because the "if (icem->state == ICE_CHECKLIST_FAILED)" does not bail out. I think it should be "if (icem->state != ICE_CHECKLIST_RUNNING)" instead, at least that did the trick for me.

thanks for the report.

Could you please create a PR for this fix ?