tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1067743 - /tomcat/trunk/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java
Date Sun, 06 Feb 2011 20:17:59 GMT
Author: markt
Date: Sun Feb  6 20:17:58 2011
New Revision: 1067743

URL: http://svn.apache.org/viewvc?rev=1067743&view=rev
Log:
Fix the expiration logic

Modified:
    tomcat/trunk/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java

Modified: tomcat/trunk/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java?rev=1067743&r1=1067742&r2=1067743&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java Sun Feb 
6 20:17:58 2011
@@ -155,7 +155,7 @@ public class CrawlerSessionManagerValve 
     public void backgroundProcess() {
         super.backgroundProcess();
         
-        long expireTime = System.currentTimeMillis() +
+        long expireTime = System.currentTimeMillis() -
                 (sessionInactiveInterval + 60) * 1000;
 
         Iterator<Entry<String,SessionInfo>> iter =
@@ -164,7 +164,7 @@ public class CrawlerSessionManagerValve 
         // Remove any sessions in the cache that have expired. 
         while (iter.hasNext()) {
             Entry<String,SessionInfo> entry = iter.next();
-            if (entry.getValue().getLastAccessed() > expireTime) {
+            if (entry.getValue().getLastAccessed() < expireTime) {
                 iter.remove();
             }
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message