From e937f5d8b9a474faf4ae1090ca5220496a7867d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ken-H=C3=A5vard=20Lieng?= Date: Fri, 22 May 2020 01:22:08 +0200 Subject: [PATCH] Quit on ERROR --- pkg/irc/conn.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/irc/conn.go b/pkg/irc/conn.go index 7a3249ce..be36f4d0 100644 --- a/pkg/irc/conn.go +++ b/pkg/irc/conn.go @@ -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