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/03/24 09:21:29 UTC

[directory-ldap-api] branch master updated: Cancel the handshake when closing the session

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-ldap-api.git


The following commit(s) were added to refs/heads/master by this push:
     new 36067cb  Cancel the handshake when closing the session
36067cb is described below

commit 36067cb58a2a8121d5253da4ea19858e23bc1722
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Thu Mar 24 10:21:12 2022 +0100

    Cancel the handshake when closing the session
---
 .../org/apache/directory/ldap/client/api/LdapNetworkConnection.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
index a8b8dc0..8401ca5 100644
--- a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
+++ b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
@@ -4848,6 +4848,11 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
     {
         authenticated.set( false );
         
+        if ( handshakeFuture != null )
+        {
+            handshakeFuture.cancel();
+        }
+        
         // Close all the Future for this session
         for ( ResponseFuture<? extends Response> responseFuture : futureMap.values() )
         {
@@ -5458,5 +5463,4 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
             return null;
         }
     }
-
 }