fix: app stopped status (#3723)

This commit is contained in:
ChengLei Shao 2024-03-19 09:24:01 +08:00 committed by GitHub
parent 368036923f
commit 6665aca695
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 });
}
});