consul: Suppress messages about closed connections

This commit is contained in:
Armon Dadgar 2014-05-28 16:28:06 -07:00
parent d4a62e7c0d
commit 6b2fe4869b
1 changed files with 1 additions and 1 deletions

View File

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