From 37f49427e132107bdb2b1601bdd5015ee76b4bd6 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Fri, 23 May 2014 16:28:55 -0700 Subject: [PATCH] consul: Suppress error if connection is closed --- consul/rpc.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/consul/rpc.go b/consul/rpc.go index fd2ebae1d1..cfc1fc51b5 100644 --- a/consul/rpc.go +++ b/consul/rpc.go @@ -62,7 +62,9 @@ func (s *Server) handleConn(conn net.Conn, isTLS bool) { // Read a single byte buf := make([]byte, 1) 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() return }