Commit bbf7f2d7 authored by Fabrice Bellet's avatar Fabrice Bellet Committed by Olivier Crête

agent: warn when closing the agent with alive turn refreshes

This patch suggests the developer to close its alive reservations on
the turn server before disposing the agent.

Not removing reservations on the turn server, will make them alive until
their default timeout, generally 300 seconds, which is not fair for the
turn server resources, but also it may cause a fatal error 437,
"Mismatched allocation: wrong transaction ID", when another agent tries
to contact the same turn server using the same nat mapping before this
delay expires.
parent 8ccac4b0
......@@ -5624,6 +5624,11 @@ nice_agent_dispose (GObject *object)
free_queued_signal (sig);
}
if (agent->refresh_list)
g_warning ("Agent %p : We still have alive TURN refreshes. Consider "
"using nice_agent_close_async() to prune them before releasing the "
"agent.", agent);
g_free (agent->stun_server_ip);
agent->stun_server_ip = NULL;
......
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