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:32 UTC
[trafficserver] branch 9.0.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 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new ca074a7 fixup in HttpSM to only set [TS_MILESTONE_SERVER_CLOSE if TS_MILESTONE_SERVER_CONNECT has been set (#7259)
ca074a7 is described below
commit ca074a77ad4c8f716fc40061f19de10a5abc7c75
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 a247c47..18ef278 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -2951,7 +2951,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;