diff --git a/redisson-tomcat/redisson-tomcat-10/src/main/java/org/redisson/tomcat/RedissonSessionManager.java b/redisson-tomcat/redisson-tomcat-10/src/main/java/org/redisson/tomcat/RedissonSessionManager.java index 89fa8296e..46e06a70d 100644 --- a/redisson-tomcat/redisson-tomcat-10/src/main/java/org/redisson/tomcat/RedissonSessionManager.java +++ b/redisson-tomcat/redisson-tomcat-10/src/main/java/org/redisson/tomcat/RedissonSessionManager.java @@ -226,7 +226,8 @@ public class RedissonSessionManager extends ManagerBase { public void remove(Session session, boolean update) { super.remove(session, update); - if (session.getIdInternal() != null) { + if (session.getIdInternal() != null + && !redisson.isShuttingDown()) { ((RedissonSession)session).delete(); } } diff --git a/redisson-tomcat/redisson-tomcat-11/src/main/java/org/redisson/tomcat/RedissonSessionManager.java b/redisson-tomcat/redisson-tomcat-11/src/main/java/org/redisson/tomcat/RedissonSessionManager.java index 89fa8296e..467535ecb 100644 --- a/redisson-tomcat/redisson-tomcat-11/src/main/java/org/redisson/tomcat/RedissonSessionManager.java +++ b/redisson-tomcat/redisson-tomcat-11/src/main/java/org/redisson/tomcat/RedissonSessionManager.java @@ -225,8 +225,9 @@ public class RedissonSessionManager extends ManagerBase { @Override public void remove(Session session, boolean update) { super.remove(session, update); - - if (session.getIdInternal() != null) { + + if (session.getIdInternal() != null + && !redisson.isShuttingDown()) { ((RedissonSession)session).delete(); } } diff --git a/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/RedissonSessionManager.java b/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/RedissonSessionManager.java index 8676108fa..3e3539978 100644 --- a/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/RedissonSessionManager.java +++ b/redisson-tomcat/redisson-tomcat-7/src/main/java/org/redisson/tomcat/RedissonSessionManager.java @@ -225,8 +225,9 @@ public class RedissonSessionManager extends ManagerBase { @Override public void remove(Session session, boolean update) { super.remove(session, update); - - if (session.getIdInternal() != null) { + + if (session.getIdInternal() != null + && !redisson.isShuttingDown()) { ((RedissonSession)session).delete(); } } diff --git a/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/RedissonSessionManager.java b/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/RedissonSessionManager.java index 64af63371..470288c87 100644 --- a/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/RedissonSessionManager.java +++ b/redisson-tomcat/redisson-tomcat-8/src/main/java/org/redisson/tomcat/RedissonSessionManager.java @@ -225,8 +225,9 @@ public class RedissonSessionManager extends ManagerBase { @Override public void remove(Session session, boolean update) { super.remove(session, update); - - if (session.getIdInternal() != null) { + + if (session.getIdInternal() != null + && !redisson.isShuttingDown()) { ((RedissonSession)session).delete(); } } diff --git a/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/RedissonSessionManager.java b/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/RedissonSessionManager.java index d4262773c..73379f541 100644 --- a/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/RedissonSessionManager.java +++ b/redisson-tomcat/redisson-tomcat-9/src/main/java/org/redisson/tomcat/RedissonSessionManager.java @@ -233,8 +233,9 @@ public class RedissonSessionManager extends ManagerBase { @Override public void remove(Session session, boolean update) { super.remove(session, update); - - if (session.getIdInternal() != null) { + + if (session.getIdInternal() != null + && !redisson.isShuttingDown()) { ((RedissonSession)session).delete(); } }