diff --git a/server/core/service.c b/server/core/service.c index 96de91c7f..a9b34d2bc 100644 --- a/server/core/service.c +++ b/server/core/service.c @@ -432,6 +432,12 @@ int listeners = 0; service->stats.started = time(0); } + /** Add the task that monitors session timeouts */ + if(service->conn_timeout > 0) + { + hktask_add("connection_timeout",session_close_timeouts,NULL,5); + } + return listeners; } @@ -468,11 +474,6 @@ serviceStartAll() SERVICE *ptr; int n = 0,i; - -/** Add the task that monitors session timeouts */ - -hktask_add("connection_timeout",session_close_timeouts,NULL,5); - ptr = allServices; while (ptr && !ptr->svc_do_shutdown) {