From a9ba00914e9cec3f13f964013f71908dec4b9e54 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 30 Sep 2013 00:13:04 +0900 Subject: [PATCH] nghttpx: Log error_code when submitting RST_STREAM --- src/shrpx_http2_upstream.cc | 4 +++- src/shrpx_spdy_session.cc | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/shrpx_http2_upstream.cc b/src/shrpx_http2_upstream.cc index 8b6b161a..f03afc14 100644 --- a/src/shrpx_http2_upstream.cc +++ b/src/shrpx_http2_upstream.cc @@ -710,7 +710,9 @@ int Http2Upstream::rst_stream(Downstream *downstream, { if(LOG_ENABLED(INFO)) { ULOG(INFO, this) << "RST_STREAM stream_id=" - << downstream->get_stream_id(); + << downstream->get_stream_id() + << " with error_code=" + << error_code; } int rv; rv = nghttp2_submit_rst_stream(session_, downstream->get_stream_id(), diff --git a/src/shrpx_spdy_session.cc b/src/shrpx_spdy_session.cc index cec3e25f..7a58385f 100644 --- a/src/shrpx_spdy_session.cc +++ b/src/shrpx_spdy_session.cc @@ -582,6 +582,12 @@ int SpdySession::submit_rst_stream(SpdyDownstreamConnection *dconn, nghttp2_error_code error_code) { assert(state_ == CONNECTED); + if(LOG_ENABLED(INFO)) { + SSLOG(INFO, this) << "RST_STREAM stream_id=" + << stream_id + << " with error_code=" + << error_code; + } int rv = nghttp2_submit_rst_stream(session_, stream_id, error_code); if(rv != 0) { SSLOG(FATAL, this) << "nghttp2_submit_rst_stream() failed: "