KockaAdmiralac/KockaLogger

Clean up everything on SIGINT

Closed this issue · 0 comments

Description

As of v1.1.5, KockaLogger handles SIGINT. However, it doesn't clean up all resources hence the need for a forced process.exit();. All components of KockaLogger that need it should be given a chance to clean up their resources for a clean shutdown.

Proposed solution

  • HTTP requests that are currently running should preferably be waited on to finish.
    • That most likely means they need to be tracked somewhere in IO and that IO#close is required.
  • A console loader should be shown with the amount of left callbacks that need to be called/requests that need to finish.
  • If there is something wrong and KockaLogger isn't shutting down after a minute, report an error and force a shutdown.