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/13 20:46:59 UTC
[trafficserver] branch 9.0.x updated: Ensure inactivity timeout is
not set when passed in timeout value is 0 (#6772)
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 164291d Ensure inactivity timeout is not set when passed in timeout value is 0 (#6772)
164291d is described below
commit 164291d3ab12bcc89442cd20e5ec823aed2013d0
Author: Sudheer Vinukonda <su...@apache.org>
AuthorDate: Wed May 13 13:39:11 2020 -0700
Ensure inactivity timeout is not set when passed in timeout value is 0 (#6772)
(cherry picked from commit 0ab955afa3767e05f0d9393eb91071a3d79c6fa6)
---
iocore/net/UnixNetVConnection.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index ab068f3..6d2070d 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -1352,7 +1352,7 @@ UnixNetVConnection::set_inactivity_timeout(ink_hrtime timeout_in)
timeout_in = HRTIME_SECONDS(nh->config.default_inactivity_timeout);
}
inactivity_timeout_in = timeout_in;
- next_inactivity_timeout_at = Thread::get_hrtime() + inactivity_timeout_in;
+ next_inactivity_timeout_at = (timeout_in > 0) ? Thread::get_hrtime() + inactivity_timeout_in : 0;
}
/*