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 b9eaee8f95d053b6339e8cb45093ad74df2b9b5b
Author: Fei Deng <[email protected]>
AuthorDate: Wed Feb 28 17:11:39 2024 -0600

    add back EVENT_INTERVAL (#11072)
    
    (cherry picked from commit 5ed1504a377ba5173b0b61ed6d277964fb731742)
---
 src/proxy/http/HttpSM.cc | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/proxy/http/HttpSM.cc b/src/proxy/http/HttpSM.cc
index 847be6e441..dca99d1f82 100644
--- a/src/proxy/http/HttpSM.cc
+++ b/src/proxy/http/HttpSM.cc
@@ -1094,7 +1094,13 @@ HttpSM::state_raw_http_server_open(int event, void *data)
     // use this value just to get around other values
     t_state.hdr_info.response_error = HttpTransact::STATUS_CODE_SERVER_ERROR;
     break;
-
+  case EVENT_INTERVAL:
+    // If we get EVENT_INTERNAL it means that we moved the transaction
+    // to a different thread in do_http_server_open.  Since we didn't
+    // do any of the actual work in do_http_server_open, we have to
+    // go back and do it now.
+    do_http_server_open(true);
+    return 0;
   default:
     ink_release_assert(0);
     break;
@@ -1849,6 +1855,11 @@ HttpSM::state_http_server_open(int event, void *data)
     }
     return 0;
   }
+  case EVENT_INTERVAL: // Delayed call from another thread
+    if (server_txn == nullptr) {
+      do_http_server_open();
+    }
+    break;
   default:
     Error("[HttpSM::state_http_server_open] Unknown event: %d", event);
     ink_release_assert(0);

Reply via email to