From 8846b5c96fc8ee276d06b7d73db1eb7d4aac9d7c Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Wed, 10 Nov 2021 13:47:36 +0200 Subject: [PATCH] handle aborted responses in lens proxy (#4308) 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 b1eb4467d3..bfaaab27ef 100644 --- a/src/main/lens-proxy.ts +++ b/src/main/lens-proxy.ts @@ -146,6 +146,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) => {