handle sigint

This commit is contained in:
AJ ONeal 2016-09-30 02:41:39 -04:00
parent 442283f42c
commit ce92e22f12
1 changed files with 1 additions and 0 deletions

View File

@ -167,6 +167,7 @@ return;
wstunneler.on('close', function () { wstunneler.on('close', function () {
console.log('closing tunnel...'); console.log('closing tunnel...');
process.removeListener('exit', onExit); process.removeListener('exit', onExit);
process.removeListener('SIGINT', onExit);
Object.keys(localclients).forEach(function (cid) { Object.keys(localclients).forEach(function (cid) {
try { try {
localclients[cid].end(); localclients[cid].end();