소스 검색

SEC-1104: Added check of "running" flag in stop() method to prevent stopping twice.

Luke Taylor 16 년 전
부모
커밋
1fa46f4ad2
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      ldap/src/main/java/org/springframework/security/ldap/server/ApacheDSContainer.java

+ 4 - 0
ldap/src/main/java/org/springframework/security/ldap/server/ApacheDSContainer.java

@@ -183,6 +183,10 @@ public class ApacheDSContainer implements InitializingBean, DisposableBean, Life
 
     @SuppressWarnings("unchecked")
     public void stop() {
+        if (!isRunning()) {
+            return;
+        }
+
         Properties env = new Properties();
         env.setProperty(Context.INITIAL_CONTEXT_FACTORY, ServerContextFactory.class.getName());
         env.setProperty(Context.SECURITY_AUTHENTICATION, "simple");