From 7b8503d42fa86c244fa08e94e0a0d3deb605fecf Mon Sep 17 00:00:00 2001 From: nikunis Date: Mon, 13 Nov 2023 19:51:37 +0500 Subject: [PATCH] fix --- sources/sighandler.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/sighandler.c b/sources/sighandler.c index 7c04119b7..5ce9c4b0e 100644 --- a/sources/sighandler.c +++ b/sources/sighandler.c @@ -58,6 +58,7 @@ od_attribute_noreturn() void od_system_shutdown(od_system_t *system, /* Prevent OpenSSL usage during deinitialization */ od_worker_pool_wait(); +#ifdef OD_SYSTEM_SHUTDOWN_CLEANUP od_router_free(system->global->router); od_extention_free(&instance->logger, system->global->extentions); @@ -67,6 +68,7 @@ od_attribute_noreturn() void od_system_shutdown(od_system_t *system, /* stop machinaruim and free */ od_instance_free(instance); exit(0); +#endif } void od_system_signal_handler(void *arg) @@ -99,7 +101,7 @@ void od_system_signal_handler(void *arg) switch (rc) { case SIGTERM: case SIGINT: - exit(0); + od_system_shutdown(system, instance); break; case SIGHUP: od_log(&instance->logger, "system", NULL, NULL,