Commit 9953608d authored by Sjoerd Simons's avatar Sjoerd Simons

Reset the connectivity check timer when we get triggered checks

Current nice has a race where if the remote site only punches their side
of the NAT after we have done the maximum number of retransmissions,
we'll never send a new connectivity check (which would be successful).
Causing the connectiviy check to fail eventually, even though it
shouldn't have.

By resetting the conncheck timer nice will always send new stun packets
for connectivity checks afterwards, but also sent connectivity checks
quicker so we can establish the connection quicker.
parent a60f8495
......@@ -1765,8 +1765,13 @@ static gboolean priv_schedule_triggered_check (NiceAgent *agent, Stream *stream,
priv_conn_check_initiate (agent, p);
else if (p->state == NICE_CHECK_IN_PROGRESS) {
/* XXX: according to ICE 7.2.1.4 "Triggered Checks" (ID-19),
* we should cancel the existing one, and send a new one...? :P */
nice_debug ("Agent %p : Skipping triggered check, already in progress..", agent);
* we should cancel the existing one, instead we reset our timer, so
* we'll resend the exiting transactions faster if needed...? :P
*/
nice_debug ("Agent %p : check already in progress, "
"restarting the timer..", agent);
stun_timer_start (&p->timer, STUN_TIMER_DEFAULT_TIMEOUT,
STUN_TIMER_DEFAULT_MAX_RETRANSMISSIONS);
}
else if (p->state == NICE_CHECK_SUCCEEDED ||
p->state == NICE_CHECK_DISCOVERED) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment