mirror of
https://github.com/trafficlunar/api.git
synced 2026-06-27 22:24:08 +00:00
fix: computer online not changing when websocket disconnected
This commit is contained in:
parent
58adca9cd0
commit
e7e06cf646
2 changed files with 4 additions and 5 deletions
|
|
@ -6,8 +6,7 @@ import (
|
|||
|
||||
var ComputerData model.ComputerGraphData
|
||||
|
||||
func AddComputerData(online bool, clientMessage model.ComputerWebSocketMessage) {
|
||||
ComputerData.Online = online
|
||||
func AddComputerData(clientMessage model.ComputerWebSocketMessage) {
|
||||
ComputerData.Cpu = append(ComputerData.Cpu, int(clientMessage.Cpu))
|
||||
ComputerData.Ram = append(ComputerData.Ram, int(clientMessage.Ram))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue