From 490bd045f942eae8d8f0ea087332a0806b52aa14 Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Thu, 25 Feb 2021 15:21:31 +0200 Subject: [PATCH] force flush only when watch param exists Signed-off-by: Jari Kolehmainen --- src/main/lens-proxy.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/lens-proxy.ts b/src/main/lens-proxy.ts index 4781012c93..7e1aa98b7e 100644 --- a/src/main/lens-proxy.ts +++ b/src/main/lens-proxy.ts @@ -127,8 +127,10 @@ export class LensProxy { this.retryCounters.delete(retryCounterId); } - if (!res.headersSent) { - res.flushHeaders(); + if (!res.headersSent && req.url) { + const url = new URL(req.url, "http://localhost"); + + if (url.searchParams.has("watch")) res.flushHeaders(); } });