nghttpx: Log error_code when submitting RST_STREAM

This commit is contained in:
Tatsuhiro Tsujikawa 2013-09-30 00:13:04 +09:00
parent 8e9f08f81d
commit a9ba00914e
2 changed files with 9 additions and 1 deletions

View File

@ -710,7 +710,9 @@ int Http2Upstream::rst_stream(Downstream *downstream,
{ {
if(LOG_ENABLED(INFO)) { if(LOG_ENABLED(INFO)) {
ULOG(INFO, this) << "RST_STREAM stream_id=" ULOG(INFO, this) << "RST_STREAM stream_id="
<< downstream->get_stream_id(); << downstream->get_stream_id()
<< " with error_code="
<< error_code;
} }
int rv; int rv;
rv = nghttp2_submit_rst_stream(session_, downstream->get_stream_id(), rv = nghttp2_submit_rst_stream(session_, downstream->get_stream_id(),

View File

@ -582,6 +582,12 @@ int SpdySession::submit_rst_stream(SpdyDownstreamConnection *dconn,
nghttp2_error_code error_code) nghttp2_error_code error_code)
{ {
assert(state_ == CONNECTED); 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); int rv = nghttp2_submit_rst_stream(session_, stream_id, error_code);
if(rv != 0) { if(rv != 0) {
SSLOG(FATAL, this) << "nghttp2_submit_rst_stream() failed: " SSLOG(FATAL, this) << "nghttp2_submit_rst_stream() failed: "