mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(core): Enforce shutdown timer and sequence on SIGINT for main (#10346)
This commit is contained in:
@@ -315,7 +315,7 @@ export abstract class BaseCommand extends Command {
|
|||||||
this.exit(exitCode);
|
this.exit(exitCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
private onTerminationSignal(signal: string) {
|
protected onTerminationSignal(signal: string) {
|
||||||
return async () => {
|
return async () => {
|
||||||
if (this.shutdownService.isShuttingDown()) {
|
if (this.shutdownService.isShuttingDown()) {
|
||||||
this.logger.info(`Received ${signal}. Already shutting down...`);
|
this.logger.info(`Received ${signal}. Already shutting down...`);
|
||||||
|
|||||||
@@ -332,7 +332,7 @@ export class Start extends BaseCommand {
|
|||||||
this.openBrowser();
|
this.openBrowser();
|
||||||
} else if (key.charCodeAt(0) === 3) {
|
} else if (key.charCodeAt(0) === 3) {
|
||||||
// Ctrl + c got pressed
|
// Ctrl + c got pressed
|
||||||
void this.stopProcess();
|
void this.onTerminationSignal('SIGINT')();
|
||||||
} else {
|
} else {
|
||||||
// When anything else got pressed, record it and send it on enter into the child process
|
// When anything else got pressed, record it and send it on enter into the child process
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user