Skip to content

Commit

Permalink
Merge pull request #204 from rmccallum81/next
Browse files Browse the repository at this point in the history
Add listener for SIGTERM
  • Loading branch information
icebob committed Feb 26, 2018
2 parents 7f81806 + 6e75543 commit 771d967
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/service-broker.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ class ServiceBroker {
process.on("beforeExit", this._closeFn);
process.on("exit", this._closeFn);
process.on("SIGINT", this._closeFn);
process.on("SIGTERM", this._closeFn);
}

getModuleClass(obj, name) {
Expand Down Expand Up @@ -404,6 +405,7 @@ class ServiceBroker {
process.removeListener("beforeExit", this._closeFn);
process.removeListener("exit", this._closeFn);
process.removeListener("SIGINT", this._closeFn);
process.removeListener("SIGTERM", this._closeFn);
});
}

Expand Down

0 comments on commit 771d967

Please sign in to comment.