Skip to content

Commit

Permalink
ice: avoid late mDNS candidates
Browse files Browse the repository at this point in the history
  • Loading branch information
sreimers committed Oct 4, 2023
1 parent 4bace25 commit 02529e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/ice/connchk.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,9 @@ static void rcand_wait_timeout(void *arg)
{
struct icem *icem = arg;

/* Avoid long startup delay */
icem->rcand_wait = false;

icem_conncheck_start(icem);
}

Expand Down
6 changes: 5 additions & 1 deletion src/ice/icesdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,11 @@ static void delayed_rcand(int err, void *arg)
if (err)
goto out;

if (!rcand->icem->rcand_wait) {
DEBUG_INFO("Late mDNS candidate\n");
goto out;
}

/* add only if not exist */
if (icem_cand_find(&rcand->icem->rcandl, rcand->cid, &rcand->caddr))
goto out;
Expand All @@ -247,7 +252,6 @@ static void delayed_rcand(int err, void *arg)
&rcand->caddr, &rcand->rel_addr, &rcand->foundation);

out:
rcand->icem->rcand_wait = false;
mem_deref(rcand);
}

Expand Down

0 comments on commit 02529e2

Please sign in to comment.