From 7dbb1e45cc78aa6c594cd63ba7653ca2d00da4c3 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 17 Apr 2017 15:30:17 +0200 Subject: [PATCH] terminate properly --- sync.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sync.ts b/sync.ts index 9fea22f..bf50a5c 100644 --- a/sync.ts +++ b/sync.ts @@ -131,3 +131,10 @@ wsServer.on('request', function (request) { } }); }); + +process.on('SIGINT', function () { + process.exit(); +}); +process.on('SIGTERM', function () { + process.exit(); +});