You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2022/08/14 13:01:38 UTC

[directory-server] branch master updated: Shutdown the Executor inside the Executor Filter when stopping the server. This fixes DIRSERVER-2176

This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-server.git


The following commit(s) were added to refs/heads/master by this push:
     new ea342d7bf4 Shutdown the Executor inside the Executor Filter when stopping the server. This fixes DIRSERVER-2176
ea342d7bf4 is described below

commit ea342d7bf4ec69d0fecf940604879b4ae86b5976
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Sun Aug 14 15:01:30 2022 +0200

    Shutdown the Executor inside the Executor Filter when stopping the server. This fixes DIRSERVER-2176
---
 .../src/main/java/org/apache/directory/server/ldap/LdapServer.java | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java b/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
index 97d4891336..e13f12f05b 100644
--- a/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
+++ b/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
@@ -561,6 +561,12 @@ public class LdapServer extends DirectoryBackedService
                     return;
                 }
 
+                
+                // Kill the chain executor
+                ExecutorFilter executorFilter = ( ExecutorFilter ) transport.getAcceptor().getFilterChain().get( "executor" );
+                ( ( UnorderedThreadPoolExecutor ) executorFilter.getExecutor() ).shutdownNow();
+
+                // Shutdown the transport
                 getSocketAcceptor( transport ).dispose();
 
                 if ( LOG.isInfoEnabled() )
@@ -593,6 +599,7 @@ public class LdapServer extends DirectoryBackedService
                 }
             }
 
+            // Stop the replication consumers
             stopConsumers();
         }
         catch ( Exception e )