Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaUnisikhin committed Nov 13, 2023
1 parent 04ffa12 commit 7b8503d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sources/sighandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 7b8503d

Please sign in to comment.