From 7e0648bef9f6f4a920e142f896d8a485f135d11f Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Mon, 22 Aug 2022 00:39:41 -0700 Subject: [PATCH] Added explicit close to Windows Dispatcher --- agents/meshcore.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/agents/meshcore.js b/agents/meshcore.js index 5679f84d..a6126b56 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -1968,6 +1968,13 @@ function onTcpRelayServerTunnelData(data) { function onTunnelClosed() { + if (this.httprequest._dispatcher != null && this.httprequest.term == null) + { + // Windows Dispatcher was created to spawn a child connection, but the child didn't connect yet, so we have to shutdown the dispatcher, otherwise the child may end up hanging + if (this.httprequest._dispatcher.close) { this.httprequest._dispatcher.close(); } + this.httprequest._dispatcher = null; + } + if (this.tunnel) { if (tunnels[this.httprequest.index] == null)