|
|
|
|
@ -1928,6 +1928,10 @@ func (h *AdminHandler) AdminHeroSnapshotWS(w http.ResponseWriter, r *http.Reques
|
|
|
|
|
case <-r.Context().Done():
|
|
|
|
|
return
|
|
|
|
|
case <-ticker.C:
|
|
|
|
|
// Align admin live stream with engine: no periodic snapshots while global time is paused.
|
|
|
|
|
if h.engine != nil && h.engine.IsTimePaused() {
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
if err := sendSnapshot(); err != nil {
|
|
|
|
|
_ = conn.WriteJSON(map[string]string{"error": err.Error()})
|
|
|
|
|
return
|
|
|
|
|
|