Commit 65f2eda0 authored by Olivier Crête's avatar Olivier Crête

conncheck: Don't reset keepalive timer on next keepalive

If the keepalive is still being re-send, just let the retries do their
job. If they don't get a reply, then declare the attempt failed.
parent 1ab9d7c1
......@@ -604,13 +604,12 @@ static gboolean priv_conn_keepalive_retransmissions_tick (gpointer pointer)
stun_message_id (&pair->keepalive.stun_message, id);
stun_agent_forget_transaction (&component->stun_agent, id);
pair->keepalive.stun_message.buffer = NULL;
if (pair->keepalive.agent->media_after_tick) {
nice_debug ("Agent %p : Keepalive conncheck timed out!! "
"but media was received. Suspecting keepalive lost because of "
"network bottleneck", pair->keepalive.agent);
pair->keepalive.stun_message.buffer = NULL;
} else {
nice_debug ("Agent %p : Keepalive conncheck timed out!! "
"peer probably lost connection", pair->keepalive.agent);
......@@ -640,7 +639,7 @@ static gboolean priv_conn_keepalive_retransmissions_tick (gpointer pointer)
priv_conn_keepalive_retransmissions_tick, pair);
break;
default:
/* Nothing to do. */
g_assert_not_reached();
break;
}
......@@ -721,6 +720,13 @@ static gboolean priv_conn_keepalive_tick_unlocked (NiceAgent *agent)
priority = peer_reflexive_candidate_priority (agent, p->local);
if (p->keepalive.stun_message.buffer != NULL) {
nice_debug ("Agent %p: Keepalive for s%u:c%u still"
" retransmitting, not restarting", agent, stream->id,
component->id);
continue;
}
if (nice_debug_is_enabled ()) {
gchar tmpbuf[INET6_ADDRSTRLEN];
nice_address_to_string (&p->remote->addr, tmpbuf);
......
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