Pass along just the client id instead a reference to the entire client when unregistering the client

This commit is contained in:
Gabe Kangas
2021-07-26 17:34:50 -07:00
parent f07c9e2e00
commit f85b54cfeb
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -155,7 +155,7 @@ func (c *ChatClient) close() {
log.Traceln("client closed:", c.User.DisplayName, c.id, c.ipAddress)
c.conn.Close()
c.server.unregister <- c
c.server.unregister <- c.id
if c.send != nil {
close(c.send)
c.send = nil