aboutsummaryrefslogtreecommitdiff
path: root/hotline/client_conn.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2022-05-29 09:34:24 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2022-05-29 09:34:24 -0700
commit003a743e6767b3041c3a8321566c3586d73b399a (patch)
tree5d8302cfa59a4a939a1d5db8e2e444183023e637 /hotline/client_conn.go
parent9ebf276dbdf3ecae5bdf478ec91efcefc22d6ee3 (diff)
Refactor and cleanup
Diffstat (limited to 'hotline/client_conn.go')
-rw-r--r--hotline/client_conn.go6
1 files changed, 3 insertions, 3 deletions
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