From c576b60cfc218f83280577c21191cb9ac40aac15 Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Wed, 10 Nov 2021 09:41:28 +0200 Subject: [PATCH] handle aborted responses in lens proxy Signed-off-by: Jari Kolehmainen --- src/main/lens-proxy.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/lens-proxy.ts b/src/main/lens-proxy.ts index a3bee528cd..76ef478e1d 100644 --- a/src/main/lens-proxy.ts +++ b/src/main/lens-proxy.ts @@ -142,6 +142,10 @@ export class LensProxy extends Singleton { res.flushHeaders(); } } + + proxyRes.on("aborted", () => { // happens when proxy target aborts connection + res.end(); + }); }); proxy.on("error", (error, req, res, target) => {