Skip to content

Commit

Permalink
fix(core): Enforce shutdown timer and sequence on SIGINT for main
Browse files Browse the repository at this point in the history
  • Loading branch information
ivov committed Aug 9, 2024
1 parent 4f392b5 commit f3beadf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/cli/src/commands/BaseCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ export abstract class BaseCommand extends Command {
this.exit(exitCode);
}

private onTerminationSignal(signal: string) {
protected onTerminationSignal(signal: string) {
return async () => {
if (this.shutdownService.isShuttingDown()) {
this.logger.info(`Received ${signal}. Already shutting down...`);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ export class Start extends BaseCommand {
this.openBrowser();
} else if (key.charCodeAt(0) === 3) {
// Ctrl + c got pressed
void this.stopProcess();
void this.onTerminationSignal('SIGINT')();
} else {
// When anything else got pressed, record it and send it on enter into the child process

Expand Down

0 comments on commit f3beadf

Please sign in to comment.