reduced min delay for events to 0.5 seconds.

This commit is contained in:
Erik Brakkee 2024-08-25 10:12:24 +02:00
parent 3117fff4ce
commit 4f97b29776

View File

@ -86,7 +86,7 @@ func (sessions *WebSessions) NewSession(ctx context.Context, cancel context.Canc
go func() { go func() {
throttler := throttling.NewAsyncThrottler(func(state *models.State) { throttler := throttling.NewAsyncThrottler(func(state *models.State) {
session.notifications <- state session.notifications <- state
}, time.Second, time.Second) }, 500*time.Millisecond, 500*time.Millisecond)
for { for {
// the web app opens one websocket connection and sends a hello // 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. // message asking for the latest state when a page is loaded that requires this.