From 91dd9763eb773e50852fcdc7ebf6b2b99e47292e Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Tue, 29 Mar 2022 10:47:15 -0400 Subject: [PATCH] fix type error Signed-off-by: Sebastian Malton --- src/main/lens-proxy.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }