diff --git a/packages/core/server/src/gateway/index.ts b/packages/core/server/src/gateway/index.ts index 71ff9dd21e..ad76b81ec4 100644 --- a/packages/core/server/src/gateway/index.ts +++ b/packages/core/server/src/gateway/index.ts @@ -334,7 +334,7 @@ export class Gateway extends EventEmitter { from: 'node', }) .then(async () => { - if (!(await mainApp.isStarted())) { + if (!isStart && !(await mainApp.isStarted())) { await mainApp.stop({ logging: false }); } }) @@ -342,7 +342,7 @@ export class Gateway extends EventEmitter { if (e.code !== 'commander.helpDisplayed') { mainApp.log.error(e); } - if (!(await mainApp.isStarted())) { + if (!isStart && !(await mainApp.isStarted())) { await mainApp.stop({ logging: false }); } });