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:
Willy Tarreau 2022-04-27 18:53:07 +02:00
parent e01b08db6a
commit faafe4bf16

View File

@ -2437,3 +2437,14 @@ static int deallocate_mux_cleanup(void)
return 1;
}
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);