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

Method send_goaway_frame

src/proxy/http2/Http2ConnectionState.cc:2736–2755  ·  view source on GitHub ↗

As for graceful shutdown, TS should process outstanding stream as long as possible. As for signal connection error, TS should close connection immediately.

Source from the content-addressed store, hash-verified

2734// As for graceful shutdown, TS should process outstanding stream as long as possible.
2735// As for signal connection error, TS should close connection immediately.
2736void
2737Http2ConnectionState::send_goaway_frame(Http2StreamId id, Http2ErrorCode ec)
2738{
2739 ink_assert(this->session != nullptr);
2740
2741 Http2ConDebug(session, "Send GOAWAY frame: Error Code: %u, Last Stream Id: %d", static_cast<uint32_t>(ec), id);
2742
2743 if (ec != Http2ErrorCode::HTTP2_ERROR_NO_ERROR) {
2744 Metrics::Counter::increment(http2_rsb.connection_errors_count);
2745 }
2746
2747 this->tx_error_code = {ProxyErrorClass::SSN, static_cast<uint32_t>(ec)};
2748
2749 Http2Goaway goaway;
2750 goaway.last_streamid = id;
2751 goaway.error_code = ec;
2752
2753 Http2GoawayFrame frame(goaway);
2754 this->session->xmit(frame);
2755}
2756
2757void
2758Http2ConnectionState::send_window_update_frame(Http2StreamId id, uint32_t size)

Callers 5

rcv_frameMethod · 0.95
main_event_handlerMethod · 0.95
send_headers_frameMethod · 0.95
send_rst_stream_frameMethod · 0.95
do_process_frame_readMethod · 0.80

Calls 2

incrementFunction · 0.85
xmitMethod · 0.80

Tested by

no test coverage detected