From 85554ae67276db145560591a47eb01a7970aabb2 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 20 Apr 2021 07:17:28 -0700 Subject: [PATCH] debugger: fix inspect restart on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: https://github.com/nodejs/node/issues/37224 PR-URL: https://github.com/nodejs/node/pull/38161 Backport-PR-URL: https://github.com/nodejs/node/pull/38858 Refs: https://github.com/nodejs/node/discussions/36481 Reviewed-By: Matteo Collina Reviewed-By: Jan Krems Reviewed-By: Colin Ihrig Reviewed-By: Stephen Belanger Reviewed-By: Gerhard Stöbich Reviewed-By: Michaël Zasso --- lib/internal/inspector/inspect_client.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/internal/inspector/inspect_client.js b/lib/internal/inspector/inspect_client.js index 6010f4ac09389d..831a7fda1cdff1 100644 --- a/lib/internal/inspector/inspect_client.js +++ b/lib/internal/inspector/inspect_client.js @@ -228,6 +228,9 @@ class Client extends EventEmitter { if (this._http) { this._http.destroy(); } + if (this._socket) { + this._socket.destroy(); + } this._http = null; this._lastId = 0; this._socket = null;