masaori335 commented on code in PR #12657:
URL: https://github.com/apache/trafficserver/pull/12657#discussion_r2512427686


##########
src/proxy/http/HttpTransact.cc:
##########
@@ -3731,6 +3731,16 @@ HttpTransact::handle_response_from_server(State *s)
   case CONNECTION_CLOSED:
   case BAD_INCOMING_RESPONSE:
 
+    // Ensure cause_of_death_errno is set for protocol/parsing errors if not 
already set.
+    // This prevents the assertion failure in retry_server_connection_not_open.
+    if (s->cause_of_death_errno == -UNKNOWN_INTERNAL_ERROR) {
+      if (s->current.state == PARSE_ERROR || s->current.state == 
BAD_INCOMING_RESPONSE) {
+        s->set_connect_fail(EBADMSG);
+      } else if (s->current.state == CONNECTION_CLOSED) {
+        s->set_connect_fail(EPIPE);

Review Comment:
   As Copilot pointed out, it looks like we need to set some errno in other 
error cases. Or are we sure `errno` is not `-UNKNOWN_INTERNAL_ERROR` in these 
un-handled cases?



-- 
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]

Reply via email to