Log goaway only if it ended with an non NO_ERROR code

pull/19865/head
Yash Tibrewal 6 years ago
parent 216fa1cab3
commit bc83ccd08b
  1. 6
      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

Loading…
Cancel
Save