Commit f524b656 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 532ccbbd
......@@ -534,13 +534,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);
......@@ -570,7 +569,7 @@ static gboolean priv_conn_keepalive_retransmissions_tick (gpointer pointer)
priv_conn_keepalive_retransmissions_tick, pair);
/* Nothing to do. */
......@@ -648,6 +647,13 @@ static gboolean priv_conn_keepalive_tick_unlocked (NiceAgent *agent)
size_t password_len = priv_get_password (agent,
agent_find_stream (agent, stream->id), p->remote, &password);
if (p->keepalive.stun_message.buffer != NULL) {
nice_debug ("Agent %p: Keepalive for s%u:c%u still"
" retransmitting, not restarting", agent, stream->id,
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