Skip to content

Proper way to shut down on SIGINT #89

@advplyr

Description

@advplyr

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.

acebase/src/ts/ipc/index.ts

Lines 122 to 126 in 9c72e43

public async exit(code: number = 0) {
await super.exit();
// process.exit(code);
// this.storage.debug.warn(`${this.isMaster ? 'Master' : 'Worker ' + this.id} exits`);
}

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions