Reconnect the app's command channel after sleep; list clients from it

This commit is contained in:
Ian Gulliver
2026-10-18 09:16:31 -07:00
parent 931d1b9a96
commit 1363a3604d
11 changed files with 444 additions and 388 deletions
+1 -6
View File
@@ -55,12 +55,7 @@ func (s *Server) StreamEvents(w http.ResponseWriter, r *http.Request, params api
w.Header().Set("Cache-Control", "no-cache")
w.WriteHeader(http.StatusOK)
live := s.hub.subscribe(api.ConnectedClient{
Login: viewer,
Host: r.Header.Get("Byre-Host"),
Commit: r.Header.Get("Byre-Commit"),
ConnectedAt: time.Now(),
})
live := s.hub.subscribe()
defer s.clientsChanged()
defer s.hub.unsubscribe(live)
s.clientsChanged()