Commit 35f2bbc2 authored by Sjoerd Simons's avatar Sjoerd Simons Committed by Youness Alaoui

Only restart the timer once

parent fa23dd5a
...@@ -1763,9 +1763,13 @@ static gboolean priv_schedule_triggered_check (NiceAgent *agent, Stream *stream, ...@@ -1763,9 +1763,13 @@ static gboolean priv_schedule_triggered_check (NiceAgent *agent, Stream *stream,
* we'll resend the exiting transactions faster if needed...? :P * we'll resend the exiting transactions faster if needed...? :P
*/ */
nice_debug ("Agent %p : check already in progress, " nice_debug ("Agent %p : check already in progress, "
"restarting the timer..", agent); "restarting the timer again?: %s ..", agent,
stun_timer_start (&p->timer, STUN_TIMER_DEFAULT_TIMEOUT, p->timer_restarted ? "no" : "yes");
STUN_TIMER_DEFAULT_MAX_RETRANSMISSIONS); if (!p->timer_restarted) {
stun_timer_start (&p->timer, STUN_TIMER_DEFAULT_TIMEOUT,
STUN_TIMER_DEFAULT_MAX_RETRANSMISSIONS);
p->timer_restarted = TRUE;
}
} }
else if (p->state == NICE_CHECK_SUCCEEDED || else if (p->state == NICE_CHECK_SUCCEEDED ||
p->state == NICE_CHECK_DISCOVERED) { p->state == NICE_CHECK_DISCOVERED) {
......
...@@ -73,6 +73,7 @@ struct _CandidateCheckPair ...@@ -73,6 +73,7 @@ struct _CandidateCheckPair
NiceCheckState state; NiceCheckState state;
gboolean nominated; gboolean nominated;
gboolean controlling; gboolean controlling;
gboolean timer_restarted;
guint64 priority; guint64 priority;
GTimeVal next_tick; /* next tick timestamp */ GTimeVal next_tick; /* next tick timestamp */
StunTimer timer; StunTimer timer;
......
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