Răsfoiți Sursa

experimenting with recursive update

reid 2 ani în urmă
părinte
comite
626ebe6535
1 a modificat fișierele cu 8 adăugiri și 0 ștergeri
  1. 8 0
      broadcast/broadcast.go

+ 8 - 0
broadcast/broadcast.go

@@ -346,6 +346,13 @@ func BroadcastToClients() error {
 			return err
 		}
 	}
+	// for debug, remove me
+	for client := range clients {
+		if err := client.WriteMessage(websocket.TextMessage, authJson); err != nil {
+			config.Logger.Error(fmt.Sprintf("Error writing response: %v", err))
+			return err
+		}
+	}
 	return nil
 }
 
@@ -368,6 +375,7 @@ func hostStatusLoop() {
 }
 
 // refresh loop for ship info
+// for reasons beyond my iq we can't do this through the normal update func
 func shipStatusLoop() {
 	ticker := time.NewTicker(hostInfoInterval)
 	for {