Make downstreamConn.runUntilegistered exit with an error on EOF

This commit is contained in:
Simon Ser 2020-03-16 14:30:49 +01:00
parent 75e698f671
commit b1b519d4f9
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
1 changed files with 1 additions and 3 deletions

View File

@ -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)
}