directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r906113 - /directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
Date Wed, 03 Feb 2010 16:32:40 GMT
Author: elecharny
Date: Wed Feb  3 16:32:39 2010
New Revision: 906113

URL: http://svn.apache.org/viewvc?rev=906113&view=rev
Log:
Don't call the close() method, do it in the unbind method.

Modified:
    directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java

Modified: directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
URL: http://svn.apache.org/viewvc/directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java?rev=906113&r1=906112&r2=906113&view=diff
==============================================================================
--- directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
(original)
+++ directory/clients/ldap/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
Wed Feb  3 16:32:39 2010
@@ -131,6 +131,7 @@
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.mina.core.filterchain.IoFilter;
+import org.apache.mina.core.future.CloseFuture;
 import org.apache.mina.core.future.ConnectFuture;
 import org.apache.mina.core.future.WriteFuture;
 import org.apache.mina.core.service.IoConnector;
@@ -1473,8 +1474,12 @@
         
         authenticated = false;
 
-        //  We now have to close the connection
-        close();
+        //  We now have to close the session
+        if ( ( ldapSession != null ) && ldapSession.isConnected() )
+        {
+            CloseFuture closeFuture = ldapSession.close( true );
+            closeFuture.awaitUninterruptibly();
+        }
 
         // And get out
         LOG.debug( "Unbind successful" );



Mime
View raw message