Pass along just the client id instead a reference to the entire client when unregistering the client
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user