Fixed idle session processing
The current implementation of idle connection timeouts is not safe. The sessions are handled in a way which is not thread-safe and the checking is done from a non-polling thread. With this change, the checks for the session timeouts are done in one of the polling threads in a thread-safe manner only if at least one service has enabled the timing out of idle client connections.
This commit is contained in:
@ -53,7 +53,7 @@ static HKTASK *tasks = NULL;
|
||||
static SPINLOCK tasklock = SPINLOCK_INIT;
|
||||
|
||||
static int do_shutdown = 0;
|
||||
unsigned long hkheartbeat = 0;
|
||||
long hkheartbeat = 0; /*< One heartbeat is 100 milliseconds */
|
||||
|
||||
static void hkthread(void *);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user