This is an automated email from the ASF dual-hosted git repository. cmcfarlen pushed a commit to branch 10.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit ffe023a57921d3f0902e271f2860193bcc26d08f Author: Brian Neradt <brian.ner...@gmail.com> AuthorDate: Thu Apr 11 20:01:06 2024 -0500 HttpSM::tunnel_handler: Handle WRITE events (#11242) Multiple HttpSM handlers have logic to handle write events after an EOS is sent. This applies that logic to the HttpSM::tunnel_handler as well, avoiding an unneccesary assertion. Fixes: #10681 (cherry picked from commit ed29bf7bed9e62f75bdc088a58a845a5b9689a2b) --- src/proxy/http/HttpSM.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/proxy/http/HttpSM.cc b/src/proxy/http/HttpSM.cc index d268d74db9..bc688d009f 100644 --- a/src/proxy/http/HttpSM.cc +++ b/src/proxy/http/HttpSM.cc @@ -2969,6 +2969,12 @@ HttpSM::tunnel_handler(int event, void *data) { STATE_ENTER(&HttpSM::tunnel_handler, event); + // If we had already received EOS, just go away. We would sometimes see + // a WRITE event appear after receiving EOS from the server connection + if ((event == VC_EVENT_WRITE_READY || event == VC_EVENT_WRITE_COMPLETE) && server_entry->eos) { + return 0; + } + ink_assert(event == HTTP_TUNNEL_EVENT_DONE || event == VC_EVENT_INACTIVITY_TIMEOUT); // The tunnel calls this when it is done terminate_sm = true;