From fbcd1fa0f4a5892426c020bd5d13323ac38c64cc Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Sun, 28 Jun 2020 20:32:12 +0200 Subject: [PATCH] tls: remove unnecessary close listener Wrapped streams are expected to behave the same as socket with handle. Remove unnecessary difference in handling. PR-URL: https://github.com/nodejs/node/pull/34105 Reviewed-By: Anna Henningsen Reviewed-By: Trivikram Kamat --- lib/_tls_wrap.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index 02fd7b002651c3..7031bc5047a47e 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -490,7 +490,6 @@ function TLSSocket(socket, opts) { // handle, but a JS stream doesn't have one. Wrap it up to make it look like // a socket. wrap = new JSStreamSocket(socket); - wrap.once('close', () => this.destroy()); } // Just a documented property to make secure sockets