You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bn...@apache.org on 2020/11/06 20:42:49 UTC
[trafficserver] branch master updated: fixup in HttpSM to only set
[TS_MILESTONE_SERVER_CLOSE if TS_MILESTONE_SERVER_CONNECT has been set
(#7259)
This is an automated email from the ASF dual-hosted git repository.
bnolsen 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 ef18164 fixup in HttpSM to only set [TS_MILESTONE_SERVER_CLOSE if TS_MILESTONE_SERVER_CONNECT has been set (#7259)
ef18164 is described below
commit ef18164093454f44384c5d5c8de2937a9edd6675
Author: Brian Olsen <bn...@gmail.com>
AuthorDate: Fri Nov 6 13:42:33 2020 -0700
fixup in HttpSM to only set [TS_MILESTONE_SERVER_CLOSE if TS_MILESTONE_SERVER_CONNECT has been set (#7259)
---
proxy/http/HttpSM.cc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index b2f50c7..becafac 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -2979,7 +2979,13 @@ HttpSM::tunnel_handler_server(int event, HttpTunnelProducer *p)
{
STATE_ENTER(&HttpSM::tunnel_handler_server, event);
- milestones[TS_MILESTONE_SERVER_CLOSE] = Thread::get_hrtime();
+ // An intercept handler may not set TS_MILESTONE_SERVER_CONNECT
+ // by default. Therefore we only set TS_MILESTONE_SERVER_CLOSE if
+ // TS_MILESTONE_SERVER_CONNECT is set (non-zero), lest certain time
+ // statistics are calculated from epoch time.
+ if (0 != milestones[TS_MILESTONE_SERVER_CONNECT]) {
+ milestones[TS_MILESTONE_SERVER_CLOSE] = Thread::get_hrtime();
+ }
bool close_connection = false;