Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46085
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 27 Oct 2008 18:31:50 +0000 (18:31 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 27 Oct 2008 18:31:50 +0000 (18:31 +0000)
Hard to reproduce thread safety issue with session expiration.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@708273 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/session/StandardSession.java

index 37f22af..8659dc3 100644 (file)
@@ -204,7 +204,7 @@ public class StandardSession
     /**
      * The last accessed time for this Session.
      */
-    protected long lastAccessedTime = creationTime;
+    protected volatile long lastAccessedTime = creationTime;
 
 
     /**
@@ -279,7 +279,7 @@ public class StandardSession
     /**
      * The current accessed time for this session.
      */
-    protected long thisAccessedTime = creationTime;
+    protected volatile long thisAccessedTime = creationTime;
 
 
     /**