From b1b519d4f94199019010132f125f5abbea680054 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 16 Mar 2020 14:30:49 +0100 Subject: [PATCH] Make downstreamConn.runUntilegistered exit with an error on EOF --- downstream.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/downstream.go b/downstream.go index 3777e71..b39687d 100644 --- a/downstream.go +++ b/downstream.go @@ -492,9 +492,7 @@ func (dc *downstreamConn) register() error { func (dc *downstreamConn) runUntilRegistered() error { for !dc.registered { msg, err := dc.irc.ReadMessage() - if err == io.EOF { - break - } else if err != nil { + if err != nil { return fmt.Errorf("failed to read IRC command: %v", err) }