diff --git a/daemon/call.c b/daemon/call.c index 657e03907..4db15430a 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -526,9 +526,6 @@ int call_init() { for (int i = 0; i < NUM_CALL_ITERATORS; i++) mutex_init(&rtpe_call_iterators[i].lock); - thread_create_looper(call_timer, rtpe_config.idle_scheduling, - rtpe_config.idle_priority, "kill calls timer", 1000000); - if (mqtt_publish_scope() != MPS_NONE) mqtt_timer_start(&global_mqtt_timer, NULL, NULL); diff --git a/daemon/main.c b/daemon/main.c index 42395f005..f0ef87bc6 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -1362,6 +1362,10 @@ int main(int argc, char **argv) { thread_create_looper(ice_slow_timer, rtpe_config.idle_scheduling, rtpe_config.idle_priority, "ice slow timer", 1000000); + /* thread to close expired call */ + thread_create_looper(call_timer, rtpe_config.idle_scheduling, + rtpe_config.idle_priority, "kill calls", 1000000); + if (!is_addr_unspecified(&rtpe_config.redis_ep.address) && initial_rtpe_config.redis_delete_async) thread_create_detach(redis_delete_async_loop, NULL, "redis async");