This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 644cb0441d MaxInactiveInterval set to 0 means a session never expires
644cb0441d is described below
commit 644cb0441d3e27c54fb41df05563aeeb7dd6dae8
Author: remm <[email protected]>
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 bf2df77941..4f8dc9a6ec 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: [email protected]
For additional commands, e-mail: [email protected]