Implement SignalR Core support and add session fetching for live timing

This commit is contained in:
AmanTahiliani committed 2026-06-21 19:53:42 -07:00
1 parent 024accfb3d
commit 91e2d13ab7
8 files changed
+411 -35

No files matched your search

+5
View File
@@ -121,8 +121,13 @@ func (s *Server) signalRLoop() {
s.hub.mu.Lock()
s.hub.isLive = false
s.hub.lastSnapshot = nil
s.hub.mu.Unlock()
if payload, err := json.Marshal(map[string]any{"data": nil, "is_live": false}); err == nil {
s.hub.broadcast <- sseEvent{name: "snapshot", data: payload}
}
log.Printf("web: live feed reconnecting in %v", backoff)
time.Sleep(backoff)
if backoff < maxBackoff {