MCPcopy Create free account
hub / github.com/apache/trafficserver / send_rst_stream_frame

Method send_rst_stream_frame

src/proxy/http2/Http2ConnectionState.cc:2631–2658  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2629}
2630
2631void
2632Http2ConnectionState::send_rst_stream_frame(Http2StreamId id, Http2ErrorCode ec)
2633{
2634 Http2StreamDebug(session, id, "Send RST_STREAM frame: Error Code: %u", static_cast<uint32_t>(ec));
2635
2636 if (ec != Http2ErrorCode::HTTP2_ERROR_NO_ERROR) {
2637 Metrics::Counter::increment(http2_rsb.stream_errors_count);
2638 ++stream_error_count;
2639 }
2640
2641 // change state to closed
2642 Http2Stream *stream = find_stream(id);
2643 if (stream != nullptr) {
2644 stream->set_tx_error_code({ProxyErrorClass::TXN, static_cast<uint32_t>(ec)});
2645 if (!stream->change_state(HTTP2_FRAME_TYPE_RST_STREAM, 0)) {
2646 this->send_goaway_frame(this->latest_streamid_in, Http2ErrorCode::HTTP2_ERROR_PROTOCOL_ERROR);
2647 this->session->set_half_close_local_flag(true);
2648 if (fini_event == nullptr) {
2649 fini_event = this_ethread()->schedule_imm_local(static_cast<Continuation *>(this), HTTP2_SESSION_EVENT_FINI);
2650 }
2651
2652 return;
2653 }
2654 }
2655
2656 Http2RstStreamFrame rst_stream(id, static_cast<uint32_t>(ec));
2657 this->session->xmit(rst_stream);
2658}
2659
2660void
2661Http2ConnectionState::send_settings_frame(const Http2ConnectionSettings &new_settings)

Callers 4

rcv_data_frameMethod · 0.95
rcv_frameMethod · 0.95
do_io_closeMethod · 0.80
initiating_closeMethod · 0.80

Calls 8

send_goaway_frameMethod · 0.95
incrementFunction · 0.85
this_ethreadFunction · 0.85
change_stateMethod · 0.80
schedule_imm_localMethod · 0.80
xmitMethod · 0.80
set_tx_error_codeMethod · 0.45

Tested by

no test coverage detected