This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 324918ebf3 Retry connect if server closes before receiving response 
(#12446)
324918ebf3 is described below

commit 324918ebf3b33df3a54cf7ceffc4ab9a2be1b2c4
Author: Chris McFarlen <[email protected]>
AuthorDate: Tue Aug 19 17:55:41 2025 -0500

    Retry connect if server closes before receiving response (#12446)
---
 src/proxy/http/HttpSM.cc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/proxy/http/HttpSM.cc b/src/proxy/http/HttpSM.cc
index dae99d76a3..4407105321 100644
--- a/src/proxy/http/HttpSM.cc
+++ b/src/proxy/http/HttpSM.cc
@@ -1933,13 +1933,15 @@ HttpSM::state_read_server_response_header(int event, 
void *data)
   switch (event) {
   case VC_EVENT_EOS:
     server_entry->eos = true;
+    // If we have received any bytes for this transaction do not retry
+    if (server_response_hdr_bytes > 0) {
+      
t_state.current.retry_attempts.maximize(t_state.configured_connect_attempts_max_retries());
+    }
+    break;
 
-  // Fall through
   case VC_EVENT_READ_READY:
   case VC_EVENT_READ_COMPLETE:
     // More data to parse
-    // Got some data, won't retry origin connection on error
-    
t_state.current.retry_attempts.maximize(t_state.configured_connect_attempts_max_retries());
     break;
 
   case VC_EVENT_ERROR:

Reply via email to