Quit on ERROR

This commit is contained in:
Ken-Håvard Lieng 2020-05-22 01:22:08 +02:00
parent 99b3ff519b
commit e937f5d8b9

View File

@ -242,6 +242,13 @@ func (c *Client) recv() {
if c.HandleNickInUse != nil {
go c.writeNick(c.HandleNickInUse(msg.Params[1]))
}
case Error:
c.Messages <- msg
c.connChange(false, nil)
time.Sleep(5 * time.Second)
close(c.quit)
return
}
c.Messages <- msg