diff --git a/ws/ws.go b/ws/ws.go index 3deddb1..1c16de6 100644 --- a/ws/ws.go +++ b/ws/ws.go @@ -139,6 +139,8 @@ func WsServerBackend() { } } func UpdateVisitorUser(visitorId string, toId string) { - guest, _ := ClientList[visitorId] - guest.To_id = toId + guest, ok := ClientList[visitorId] + if ok { + guest.To_id = toId + } }