diff --git a/src/main/lens-proxy.ts b/src/main/lens-proxy.ts index 7f2fbd7281..53346b9fa3 100644 --- a/src/main/lens-proxy.ts +++ b/src/main/lens-proxy.ts @@ -3,7 +3,7 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ -import type net from "net"; +import net from "net"; import type http from "http"; import spdy from "spdy"; import type httpProxy from "http-proxy"; @@ -189,7 +189,7 @@ export class LensProxy extends Singleton { }); proxy.on("error", (error, req, res, target) => { - if (this.closed) { + if (this.closed || res instanceof net.Socket) { return; }