diff --git a/daemon/main.c b/daemon/main.c index 91256a70d..fd8831fc3 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -831,13 +831,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;