Commit 0e4611f9 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Don't expire sources with non-zero refcount.

parent f21c377b
......@@ -209,7 +209,7 @@ expire_sources()
/* clock stepped */
src->time = now.tv_sec;
if(src->time < now.tv_sec - SOURCE_GC_TIME) {
if(src->route_count == 0 && src->time < now.tv_sec - SOURCE_GC_TIME) {
free(src);
memmove(sources + i, sources + i + 1,
(source_slots - i - 1) * sizeof(struct source*));
......
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