From 548cd5e835767932e08e22a65efa5b58c4f83eaa Mon Sep 17 00:00:00 2001 From: Stanislav Sinyagin Date: Mon, 6 Jan 2020 22:38:04 +0100 Subject: [PATCH] Issue #84 -- emit esl::end on socket::close net.Socket emits "end" only on successful closing, but it emits "close" in error conditions as well. --- src/esl/Connection.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/esl/Connection.ts b/src/esl/Connection.ts index 3659a23..0d228de 100644 --- a/src/esl/Connection.ts +++ b/src/esl/Connection.ts @@ -110,7 +110,7 @@ export class Connection extends EventEmitter2 }); // Emit end when stream closes - socket.on('end', () => + socket.on('close', () => { this.emit(ConnectionEvent.End); });