consul: Suppress error if connection is closed

This commit is contained in:
Armon Dadgar 2014-05-23 16:28:55 -07:00
parent 9cdeeba0eb
commit 37f49427e1
1 changed files with 3 additions and 1 deletions

View File

@ -62,7 +62,9 @@ func (s *Server) handleConn(conn net.Conn, isTLS bool) {
// Read a single byte // Read a single byte
buf := make([]byte, 1) buf := make([]byte, 1)
if _, err := conn.Read(buf); err != nil { if _, err := conn.Read(buf); err != nil {
s.logger.Printf("[ERR] consul.rpc: failed to read byte: %v", err) if err != io.EOF {
s.logger.Printf("[ERR] consul.rpc: failed to read byte: %v", err)
}
conn.Close() conn.Close()
return return
} }