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 2020/05/14 16:53:13 UTC

[trafficserver] branch 9.0.x updated: Add metrics to track default inactivity timed out connections (#6755)

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 4582cbe  Add metrics to track default inactivity timed out connections (#6755)
4582cbe is described below

commit 4582cbe69978c6bb9bdd83f209f76f0628231170
Author: Sudheer Vinukonda <su...@apache.org>
AuthorDate: Tue May 12 15:14:36 2020 -0700

    Add metrics to track default inactivity timed out connections (#6755)
    
    (cherry picked from commit 66f23063e1cb44ec04136853952dc299303a832d)
---
 iocore/net/UnixNetVConnection.cc | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index 181420e..4981958 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -1371,6 +1371,21 @@ UnixNetVConnection::is_default_inactivity_timeout()
   return (default_inactivity_timeout && inactivity_timeout_in == 0);
 }
 
+TS_INLINE void
+UnixNetVConnection::set_default_inactivity_timeout(ink_hrtime timeout_in)
+{
+  Debug("socket", "Set default inactive timeout=%" PRId64 ", for NetVC=%p", timeout_in, this);
+  inactivity_timeout_in      = 0;
+  default_inactivity_timeout = true;
+  next_inactivity_timeout_at = Thread::get_hrtime() + timeout_in;
+}
+
+TS_INLINE bool
+UnixNetVConnection::is_default_inactivity_timeout()
+{
+  return (default_inactivity_timeout && inactivity_timeout_in == 0);
+}
+
 /*
  * Close down the current netVC.  Save aside the socket and SSL information
  * and create new netVC in the current thread/netVC