From 6331a717ed919b6be47a89eb9956d35e1fcea4f6 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Wed, 28 May 2014 16:28:06 -0700 Subject: [PATCH] consul: Suppress messages about closed connections --- consul/rpc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consul/rpc.go b/consul/rpc.go index 60ad5c422e..d87109a181 100644 --- a/consul/rpc.go +++ b/consul/rpc.go @@ -149,7 +149,7 @@ func (s *Server) handleConsulConn(conn net.Conn) { rpcCodec := codec.GoRpc.ServerCodec(conn, &codec.MsgpackHandle{}) for !s.shutdown { if err := s.rpcServer.ServeRequest(rpcCodec); err != nil { - if err != io.EOF { + if err != io.EOF && !strings.Contains(err.Error(), "closed") { s.logger.Printf("[ERR] consul.rpc: RPC error: %v (%v)", err, conn) } return