From bc83ccd08b80d8e9b2854715d2b5c97a7e50c3b7 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Tue, 6 Aug 2019 15:37:18 -0700 Subject: [PATCH] Log goaway only if it ended with an non NO_ERROR code --- src/core/ext/transport/chttp2/transport/chttp2_transport.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc index 633b35e7d61..791caaf4ba5 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc @@ -1155,8 +1155,10 @@ void grpc_chttp2_add_incoming_goaway(grpc_chttp2_transport* t, gpr_log(GPR_INFO, "transport %p got goaway with last stream id %d", t, last_stream_id)); /* We want to log this irrespective of whether http tracing is enabled */ - gpr_log(GPR_INFO, "%s: Got goaway [%d] err=%s", t->peer_string, goaway_error, - grpc_error_string(t->goaway_error)); + if (goaway_error != GRPC_HTTP2_NO_ERROR) { + gpr_log(GPR_INFO, "%s: Got goaway [%d] err=%s", t->peer_string, + goaway_error, grpc_error_string(t->goaway_error)); + } /* When a client receives a GOAWAY with error code ENHANCE_YOUR_CALM and debug * data equal to "too_many_pings", it should log the occurrence at a log level