fix: patchChan loop ending after switching browser tab; feat: improve realtime chart example

This commit is contained in:
Joao Goncalves
2025-11-18 11:17:06 -01:00
parent 6fafd1d6e0
commit 0064150cbc
2 changed files with 46 additions and 31 deletions

4
via.go
View File

@@ -398,8 +398,8 @@ func New() *V {
return
case patch, ok := <-c.patchChan:
if !ok {
v.logDebug(c, "patchChan closed, exiting handler loop")
return
time.Sleep(100 * time.Millisecond)
continue
}
switch patch.typ {
case patchTypeElements: