Commit f559f388 authored by Olivier Crête's avatar Olivier Crête

conncheck: Only stop conncheck timer if no stream has pending conn checks

parent edcbc597
...@@ -1447,6 +1447,7 @@ void conn_check_prune_stream (NiceAgent *agent, Stream *stream) ...@@ -1447,6 +1447,7 @@ void conn_check_prune_stream (NiceAgent *agent, Stream *stream)
{ {
CandidateCheckPair *pair; CandidateCheckPair *pair;
GSList *i; GSList *i;
gboolean keep_going = FALSE;
for (i = stream->conncheck_list; i ; ) { for (i = stream->conncheck_list; i ; ) {
GSList *next = i->next; GSList *next = i->next;
...@@ -1462,8 +1463,16 @@ void conn_check_prune_stream (NiceAgent *agent, Stream *stream) ...@@ -1462,8 +1463,16 @@ void conn_check_prune_stream (NiceAgent *agent, Stream *stream)
break; break;
} }
if (!stream->conncheck_list) for (i = agent->streams; i; i = i->next) {
conn_check_free (agent); Stream *s = i->data;
if (s->conncheck_list) {
keep_going = TRUE;
break;
}
}
if (!keep_going)
conn_check_stop (agent);
} }
/* /*
......
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