You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2023/06/01 13:28:51 UTC
[tomcat] branch main updated: MaxInactiveInterval set to 0 means a session never expires
This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 3b885e904f MaxInactiveInterval set to 0 means a session never expires
3b885e904f is described below
commit 3b885e904ff90487efff2b0f17415742aab63bd6
Author: remm <re...@apache.org>
AuthorDate: Thu Jun 1 15:27:05 2023 +0200
MaxInactiveInterval set to 0 means a session never expires
Also remove FIXME.
---
java/org/apache/catalina/valves/PersistentValve.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/java/org/apache/catalina/valves/PersistentValve.java b/java/org/apache/catalina/valves/PersistentValve.java
index 11a1261bfb..36fa4cfec6 100644
--- a/java/org/apache/catalina/valves/PersistentValve.java
+++ b/java/org/apache/catalina/valves/PersistentValve.java
@@ -274,8 +274,7 @@ public class PersistentValve extends ValveBase {
/**
- * Indicate whether the session has been idle for longer than its expiration date as of the supplied time. FIXME:
- * Probably belongs in the Session class.
+ * Indicate whether the session has been idle for longer than its expiration date as of the supplied time.
*
* @param session The session to check
* @param timeNow The current time to check for
@@ -286,7 +285,7 @@ public class PersistentValve extends ValveBase {
if (session != null) {
int maxInactiveInterval = session.getMaxInactiveInterval();
- if (maxInactiveInterval >= 0) {
+ if (maxInactiveInterval > 0) {
int timeIdle = (int) (session.getIdleTimeInternal() / 1000L);
if (timeIdle >= maxInactiveInterval) {
return true;
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org