X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/aebc4d3647b9823ae8cbb57b21b1af83bfd011fb..050407a3b7f719ed6ce9367eb803bf948075e50e:/hotline/client_conn.go diff --git a/hotline/client_conn.go b/hotline/client_conn.go index ce9d7f1..4a471b3 100644 --- a/hotline/client_conn.go +++ b/hotline/client_conn.go @@ -157,15 +157,15 @@ func (cc ClientConn) Disconnect() { delete(cc.Server.Clients, binary.BigEndian.Uint16(*cc.ID)) - cc.NotifyOthers(*NewTransaction(tranNotifyDeleteUser, nil, NewField(fieldUserID, *cc.ID))) + cc.notifyOthers(*NewTransaction(tranNotifyDeleteUser, nil, NewField(fieldUserID, *cc.ID))) if err := cc.Connection.Close(); err != nil { cc.Server.Logger.Errorw("error closing client connection", "RemoteAddr", cc.Connection.RemoteAddr()) } } -// NotifyOthers sends transaction t to other clients connected to the server -func (cc ClientConn) NotifyOthers(t Transaction) { +// notifyOthers sends transaction t to other clients connected to the server +func (cc ClientConn) notifyOthers(t Transaction) { for _, c := range sortedClients(cc.Server.Clients) { if c.ID != cc.ID && c.Agreed { t.clientID = c.ID