diff --git a/src/Tunnel.ts b/src/Tunnel.ts index 054a6c4..61fd0a6 100644 --- a/src/Tunnel.ts +++ b/src/Tunnel.ts @@ -458,8 +458,8 @@ export default class Tunnel extends Evented let canceled = false; // Ensure child process is killed when parent exits + process.on('SIGINT', () => process.exit(1)); process.on('exit', () => kill(child.pid)); - process.on('SIGINT', () => kill(child.pid)); const task = new Task( (resolve, reject) => {