forked from External/ergo
clear client channel list on destroy
This commit is contained in:
parent
2aa61b0dbe
commit
01fa48c73e
1 changed files with 7 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue