From 872ba51bf8a84a4c572c89844a5e60be3cfc968c 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. --- 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