mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Returned empty promises in ghost-server
- I have no idea why this is required and I really don't like it - this change looks superfluous but I had problems with Ghost not displaying shutting down messages properly and this is the only thing that got it working - the async-awaits were getting stuck in `await this._cleanup()`, and then wouldn't enter into the `finally` block - oddly, this was only reproducible when a job was running, it would shut down normally otherwise - if I find the solution in the mean time, I'll happily get rid of this
This commit is contained in:
parent
35b9b7cc8c
commit
d4f1274ba5
1 changed files with 6 additions and 0 deletions
|
@ -169,6 +169,9 @@ class GhostServer {
|
|||
this.httpServer = null;
|
||||
this._logStopMessages();
|
||||
}
|
||||
|
||||
// TODO: investigate why this is required (see commit)
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -203,6 +206,9 @@ class GhostServer {
|
|||
// Wait for all cleanup tasks to finish
|
||||
await Promise
|
||||
.all(this.cleanupTasks.map(task => task()));
|
||||
|
||||
// TODO: investigate why this is required (see commit)
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
_onShutdownComplete() {
|
||||
|
|
Loading…
Reference in a new issue