From 4f97b29776a7480c3522cc861d5f459bf0b93d43 Mon Sep 17 00:00:00 2001 From: Erik Brakkee Date: Sun, 25 Aug 2024 10:12:24 +0200 Subject: [PATCH] reduced min delay for events to 0.5 seconds. --- pkg/server/ui/websessions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/server/ui/websessions.go b/pkg/server/ui/websessions.go index fd9c946..94751c7 100644 --- a/pkg/server/ui/websessions.go +++ b/pkg/server/ui/websessions.go @@ -86,7 +86,7 @@ func (sessions *WebSessions) NewSession(ctx context.Context, cancel context.Canc go func() { throttler := throttling.NewAsyncThrottler(func(state *models.State) { session.notifications <- state - }, time.Second, time.Second) + }, 500*time.Millisecond, 500*time.Millisecond) for { // the web app opens one websocket connection and sends a hello // message asking for the latest state when a page is loaded that requires this.