mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-08 08:07:10 +02:00
CLEANUP: connections/deinit: destroy the idle_conns tasks
This adds a deinit_idle_conns() function that's called on deinit to release the per-thread idle connection management tasks. The global task was already taken care of.
This commit is contained in:
parent
e01b08db6a
commit
faafe4bf16
@ -2437,3 +2437,14 @@ static int deallocate_mux_cleanup(void)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
REGISTER_PER_THREAD_FREE(deallocate_mux_cleanup);
|
REGISTER_PER_THREAD_FREE(deallocate_mux_cleanup);
|
||||||
|
|
||||||
|
static void deinit_idle_conns(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < global.nbthread; i++) {
|
||||||
|
if (idle_conns[i].cleanup_task)
|
||||||
|
task_destroy(idle_conns[i].cleanup_task);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
REGISTER_POST_DEINIT(deinit_idle_conns);
|
||||||
|
Loading…
Reference in New Issue
Block a user