From 44a54824931fcf96e3a9dbffc9544730e1066e6c Mon Sep 17 00:00:00 2001 From: Raphael Catolino Date: Tue, 17 Feb 2026 20:47:20 +0100 Subject: [PATCH] fix(ui): activity Indicator switching constantly between online/offline (#5054) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When using HTTP2, setting the writeTimeout too low causes the channel to close before the keepAlive event has a chance of beeing sent. Signed-off-by: rca Co-authored-by: Deluan Quintão --- server/events/sse.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/events/sse.go b/server/events/sse.go index 39e217160..565d8c016 100644 --- a/server/events/sse.go +++ b/server/events/sse.go @@ -24,8 +24,9 @@ type Broker interface { const ( keepAliveFrequency = 15 * time.Second - writeTimeOut = 5 * time.Second - bufferSize = 1 + // The timeout must be higher than the keepAliveFrequency, or the lack of activity will cause the channel to close. + writeTimeOut = keepAliveFrequency + 5*time.Second + bufferSize = 1 ) type (