Small optimizations to session timeouts.

This commit is contained in:
Markus Makela
2015-02-23 19:59:36 +02:00
parent 4be2ffeecc
commit 57f89f5689

View File

@ -432,6 +432,12 @@ int listeners = 0;
service->stats.started = time(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; return listeners;
} }
@ -468,11 +474,6 @@ serviceStartAll()
SERVICE *ptr; SERVICE *ptr;
int n = 0,i; int n = 0,i;
/** Add the task that monitors session timeouts */
hktask_add("connection_timeout",session_close_timeouts,NULL,5);
ptr = allServices; ptr = allServices;
while (ptr && !ptr->svc_do_shutdown) while (ptr && !ptr->svc_do_shutdown)
{ {