Skip to content

Commit

Permalink
Clear any existing SIGINT listeners during startup
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jaswilli committed Jun 7, 2014
1 parent d9f7aa2 commit e7e6dfc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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",
Expand Down

0 comments on commit e7e6dfc

Please sign in to comment.