maskit commented on code in PR #12673:
URL: https://github.com/apache/trafficserver/pull/12673#discussion_r2577855737
##########
src/proxy/http2/Http2ConnectionState.cc:
##########
@@ -692,6 +704,11 @@ Http2ConnectionState::rcv_rst_stream_frame(const
Http2Frame &frame)
Http2StreamDebug(this->session, stream_id, "Parsed RST_STREAM frame: Error
Code: %u", rst_stream.error_code);
stream->set_rx_error_code({ProxyErrorClass::TXN,
static_cast<uint32_t>(rst_stream.error_code)});
stream->initiating_close();
+ // Delete the stream immediately to free up the stream count before the
next frame is processed.
+ // This prevents the race condition where HEADERS frames are incorrectly
refused due to the
+ // stream count not being decremented yet. The destructor will handle the
case where the stream
+ // has already been removed from the stream list.
+ this->delete_stream(stream);
Review Comment:
Shouldn't we call `THREAD_FREE(stream, http2StreamAllocator,
this_ethread());` instead of calling these two, `initiating_close` and
`delete_stream`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]