mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-23 04:19:25 +01:00
clear client channel list on destroy
This commit is contained in:
parent
2aa61b0dbe
commit
01fa48c73e
@ -147,13 +147,20 @@ func (client *Client) Destroy() error {
|
|||||||
|
|
||||||
close(client.replies)
|
close(client.replies)
|
||||||
client.replies = nil
|
client.replies = nil
|
||||||
|
|
||||||
client.conn.Close()
|
client.conn.Close()
|
||||||
|
|
||||||
if client.idleTimer != nil {
|
if client.idleTimer != nil {
|
||||||
client.idleTimer.Stop()
|
client.idleTimer.Stop()
|
||||||
}
|
}
|
||||||
|
|
||||||
if client.quitTimer != nil {
|
if client.quitTimer != nil {
|
||||||
client.quitTimer.Stop()
|
client.quitTimer.Stop()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// clear channel list
|
||||||
|
client.channels = make(ChannelSet)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user