From f4980d9fc2bd0ba8d9c896627d2a246ea4986802 Mon Sep 17 00:00:00 2001 From: ugjka Date: Sat, 26 Nov 2016 13:51:12 +0200 Subject: [PATCH] make other threads exit if there's an error in one --- irc.go | 1 + 1 file changed, 1 insertion(+) diff --git a/irc.go b/irc.go index 3b99bbd..7820759 100644 --- a/irc.go +++ b/irc.go @@ -198,6 +198,7 @@ func (irc *Connection) Loop() { errChan := irc.ErrorChan() for !irc.isQuitting() { err := <-errChan + close(irc.end) irc.Wait() for !irc.isQuitting() { irc.Log.Printf("Error, disconnected: %s\n", err)