2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00

Added timeout before exiting the process

no issue

- IPC communication happens before we trigger process.exit
- this is a timing issue
- we should give IPC a little time to finish sending the message over to the CLI
- wait 100ms before exiting the process
This commit is contained in:
kirrg001 2018-08-14 13:55:49 +02:00 committed by Katharina Irrgang
parent 2e9dc30151
commit 8bde199101
2 changed files with 6 additions and 2 deletions

View file

@ -133,7 +133,9 @@ const minimalRequiredSetupToStartGhost = (dbState) => {
return GhostServer.announceServerStopped(err)
.finally(() => {
common.logging.error(err);
process.exit(-1);
setTimeout(() => {
process.exit(-1);
}, 100);
});
});

View file

@ -41,6 +41,8 @@ ghost().then(function (ghostServer) {
return GhostServer.announceServerStopped(err)
.finally(() => {
common.logging.error(err);
process.exit(-1);
setTimeout(() => {
process.exit(-1);
}, 100);
});
});