diff --git a/daemon/main.c b/daemon/main.c index 01fa2e535..b670b8ad4 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -822,13 +822,14 @@ int main(int argc, char **argv) { service_notify("STOPPING=1\n"); - if (!is_addr_unspecified(&rtpe_config.redis_ep.address)) { + if (!is_addr_unspecified(&rtpe_config.redis_ep.address)) redis_notify_event_base_action(EVENT_BASE_LOOPBREAK); - redis_notify_event_base_action(EVENT_BASE_FREE); - } threads_join_all(1); + if (!is_addr_unspecified(&rtpe_config.redis_ep.address)) + redis_notify_event_base_action(EVENT_BASE_FREE); + ilog(LOG_INFO, "Version %s shutting down", RTPENGINE_VERSION); return 0;