Don't Error() for EOF, since it's expected.

This commit is contained in:
Alex Bramley 2013-03-17 21:13:20 +00:00
parent 34462b2ad5
commit 8d6b5de994
1 changed files with 4 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import (
"fmt"
"github.com/fluffle/goirc/state"
"github.com/fluffle/golog/logging"
"io"
"net"
"strings"
"sync"
@ -259,7 +260,9 @@ func (conn *Conn) recv() {
for {
s, err := conn.io.ReadString('\n')
if err != nil {
logging.Error("irc.recv(): %s", err.Error())
if err != io.EOF {
logging.Error("irc.recv(): %s", err.Error())
}
conn.shutdown()
return
}