shutdown controller on SIGTERM (#1313)

Previously, the controller was only properly shutdown on SIGINT.
SIGTERM is used by kill (unix) and to stop Docker containers.
This commit is contained in:
Willi Eggeling
2019-03-24 14:27:49 +01:00
committed by Koen Kanters
parent 363f4e1c3b
commit 69d04d0648
+1
View File
@@ -11,6 +11,7 @@ const controller = new Controller();
controller.start();
process.on('SIGINT', handleQuit);
process.on('SIGTERM', handleQuit);
function handleQuit() {
controller.stop(() => process.exit());