From 7c9fe44eb407ab6fe4184e627ea1165113bc5022 Mon Sep 17 00:00:00 2001 From: Rostislav Shtanko Date: Wed, 27 Dec 2023 10:50:58 +0300 Subject: [PATCH] add memory leak fix --- lib/http-proxy/passes/ws-incoming.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/http-proxy/passes/ws-incoming.js b/lib/http-proxy/passes/ws-incoming.js index 270f23f45..c38036bb6 100644 --- a/lib/http-proxy/passes/ws-incoming.js +++ b/lib/http-proxy/passes/ws-incoming.js @@ -129,7 +129,7 @@ module.exports = { // if it errors (eg, vanishes from the net and starts returning // EHOSTUNREACH). We need to do that explicitly. socket.on('error', function () { - proxySocket.end(); + proxySocket.destroy(); }); common.setupSocket(proxySocket);