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:31:28 UTC

[tomcat] branch 8.5.x 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 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
     new 13168adb7f MaxInactiveInterval set to 0 means a session never expires
13168adb7f is described below

commit 13168adb7fb9793cfe766584c30ec4205792d46f
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 6fe241822c..5c168d257a 100644
--- a/java/org/apache/catalina/valves/PersistentValve.java
+++ b/java/org/apache/catalina/valves/PersistentValve.java
@@ -287,8 +287,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
@@ -299,7 +298,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