consul: Suppress error if connection is closed

pull/174/head
Armon Dadgar 11 years ago
parent 9cdeeba0eb
commit 37f49427e1

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

Loading…
Cancel
Save