mirror of
https://github.com/jeremyd/ergo.git
synced 2026-05-27 10:04:47 -07:00
clear client channel list on destroy
This commit is contained in:
@@ -147,13 +147,20 @@ func (client *Client) Destroy() error {
|
||||
|
||||
close(client.replies)
|
||||
client.replies = nil
|
||||
|
||||
client.conn.Close()
|
||||
|
||||
if client.idleTimer != nil {
|
||||
client.idleTimer.Stop()
|
||||
}
|
||||
|
||||
if client.quitTimer != nil {
|
||||
client.quitTimer.Stop()
|
||||
}
|
||||
|
||||
// clear channel list
|
||||
client.channels = make(ChannelSet)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user