mirror of
https://github.com/AmanTahiliani/box-box.git
synced 2026-12-05 14:44:41 -05:00
Implement SignalR Core support and add session fetching for live timing
This commit is contained in:
1 parent
024accfb3d
commit
91e2d13ab7
8 files changed
+411
-35
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user