shiro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdem...@apache.org
Subject [5/6] shiro git commit: SHIRO-515 [1/2] Mark the ExecutorServiceSessionValidationScheduler "enabled" even with a 0 interval
Date Wed, 29 Jun 2016 17:14:47 GMT
SHIRO-515 [1/2] Mark the ExecutorServiceSessionValidationScheduler "enabled" even with a 0
interval


Project: http://git-wip-us.apache.org/repos/asf/shiro/repo
Commit: http://git-wip-us.apache.org/repos/asf/shiro/commit/21f7fe4b
Tree: http://git-wip-us.apache.org/repos/asf/shiro/tree/21f7fe4b
Diff: http://git-wip-us.apache.org/repos/asf/shiro/diff/21f7fe4b

Branch: refs/heads/1.3.x
Commit: 21f7fe4b73251dedcc768c89f1427120f1708e94
Parents: b7f846b
Author: Andreas Kohn <andreas.kohn@gmail.com>
Authored: Tue Jun 28 18:46:51 2016 +0200
Committer: Brian Demers <bdemers@stormpath.com>
Committed: Wed Jun 29 10:12:36 2016 -0700

----------------------------------------------------------------------
 .../session/mgt/ExecutorServiceSessionValidationScheduler.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/shiro/blob/21f7fe4b/core/src/main/java/org/apache/shiro/session/mgt/ExecutorServiceSessionValidationScheduler.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/shiro/session/mgt/ExecutorServiceSessionValidationScheduler.java
b/core/src/main/java/org/apache/shiro/session/mgt/ExecutorServiceSessionValidationScheduler.java
index 6c24c1b..3b4cf70 100644
--- a/core/src/main/java/org/apache/shiro/session/mgt/ExecutorServiceSessionValidationScheduler.java
+++ b/core/src/main/java/org/apache/shiro/session/mgt/ExecutorServiceSessionValidationScheduler.java
@@ -90,8 +90,8 @@ public class ExecutorServiceSessionValidationScheduler implements SessionValidat
                 }  
             });                  
             this.service.scheduleAtFixedRate(this, interval, interval, TimeUnit.MILLISECONDS);
-            this.enabled = true;
         }
+        this.enabled = true;
     }
 
     public void run() {
@@ -107,7 +107,9 @@ public class ExecutorServiceSessionValidationScheduler implements SessionValidat
     }
 
     public void disableSessionValidation() {
-        this.service.shutdownNow();
+        if (this.service != null) {
+            this.service.shutdownNow();
+        }
         this.enabled = false;
     }
 }


Mime
View raw message