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:08 UTC
[tomcat] branch 10.1.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 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new 9f3a99ccd2 MaxInactiveInterval set to 0 means a session never expires
9f3a99ccd2 is described below
commit 9f3a99ccd25df9bc57565712a8abf01e07627a89
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 36d4ca8776..17f36a50f3 100644
--- a/java/org/apache/catalina/valves/PersistentValve.java
+++ b/java/org/apache/catalina/valves/PersistentValve.java
@@ -275,8 +275,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
@@ -287,7 +286,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