mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Clear any existing SIGINT listeners during startup
No issue -remove any existing listeners on the SIGINT event during the ghost bootstrap process. handles an issue during testing where node was warning about too many listeners.
This commit is contained in:
parent
d9f7aa2ce1
commit
e7e6dfc3e6
1 changed files with 2 additions and 2 deletions
|
@ -133,7 +133,7 @@ function ghostStartMessages() {
|
|||
);
|
||||
|
||||
// ensure that Ghost exits correctly on Ctrl+C
|
||||
process.on('SIGINT', function () {
|
||||
process.removeAllListeners('SIGINT').on('SIGINT', function () {
|
||||
console.log(
|
||||
"\nGhost has shut down".red,
|
||||
"\nYour blog is now offline"
|
||||
|
@ -150,7 +150,7 @@ function ghostStartMessages() {
|
|||
"\nCtrl+C to shut down".grey
|
||||
);
|
||||
// ensure that Ghost exits correctly on Ctrl+C
|
||||
process.on('SIGINT', function () {
|
||||
process.removeAllListeners('SIGINT').on('SIGINT', function () {
|
||||
console.log(
|
||||
"\nGhost has shutdown".red,
|
||||
"\nGhost was running for",
|
||||
|
|
Loading…
Add table
Reference in a new issue