mirror of
https://github.com/appy-one/acebase.git
synced 2026-05-25 06:02:14 -06:00
[GH-ISSUE #89] Proper way to shut down on SIGINT #58
Labels
No labels
IndexedDB
browser
bug
dependencies
documentation
duplicate
enhancement
feature request
indexes
indexes
invalid
pull-request
query
question
transaction logging
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/acebase#58
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @advplyr on GitHub (Mar 27, 2022).
Original GitHub issue: https://github.com/appy-one/acebase/issues/89
Just trying this out and when CTRL+C to exit out of a node express server acebase is catching the SIGINT but not calling process.exit().
This is resulting in the express server remaining open. I noticed the process.exit() function was commented out a while back, probably for good reason but if left in it would properly exit in my case.
9c72e433ee/src/ts/ipc/index.ts (L122-L126)I'm on Windows 10, Node v16. I'm not sure if I catch the SIGINT myself and process.exit if that will leave anything open in acebase.
@advplyr commented on GitHub (Mar 27, 2022):
I have a fine solution now by registering process.on('SIGINT') after instantiating AceBase and calling process.exit myself.
Now I understand why this is better then AceBase calling process.exit because it allows me to clean up what I need to before exiting. It looked like the close() method wasn't implemented yet when I skimmed the code, but this solution works for me anyway.