This is an automated email from the ASF dual-hosted git repository.
duke8253 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 5ed1504a37 add back EVENT_INTERVAL (#11072)
5ed1504a37 is described below
commit 5ed1504a377ba5173b0b61ed6d277964fb731742
Author: Fei Deng <[email protected]>
AuthorDate: Wed Feb 28 17:11:39 2024 -0600
add back EVENT_INTERVAL (#11072)
---
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 ede21bfde4..9739e6a662 100644
--- a/src/proxy/http/HttpSM.cc
+++ b/src/proxy/http/HttpSM.cc
@@ -1093,7 +1093,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;
@@ -1842,6 +1848,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);