You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2021/01/27 19:43:53 UTC
[trafficserver] branch 8.1.x 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.
zwoop pushed a commit to branch 8.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/8.1.x by this push:
new ff853af fixup in HttpSM to only set [TS_MILESTONE_SERVER_CLOSE if TS_MILESTONE_SERVER_CONNECT has been set (#7259)
ff853af is described below
commit ff853afee80b399b9a75b09296c7814885d9ffa8
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)
(cherry picked from commit ef18164093454f44384c5d5c8de2937a9edd6675)
---
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 322f04a..eb1dc93 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -2879,7 +2879,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;