directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1151529 - /directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
Date Wed, 27 Jul 2011 16:37:31 GMT
Author: elecharny
Date: Wed Jul 27 16:37:30 2011
New Revision: 1151529

URL: http://svn.apache.org/viewvc?rev=1151529&view=rev
Log:
Put the mutex at the right place (ie, before checking for the connector nullity)...

Modified:
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java

Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java?rev=1151529&r1=1151528&r2=1151529&view=diff
==============================================================================
--- directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
(original)
+++ directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
Wed Jul 27 16:37:30 2011
@@ -659,11 +659,13 @@ public class LdapNetworkConnection exten
         // And close the connector if it has been created locally
         // Release the connector
         connectorMutex.lock();
+        
         if ( connector != null )
         {
             connector.dispose();
             connector = null;
         }
+        
         connectorMutex.unlock();
 
         // Reset the messageId
@@ -3698,14 +3700,16 @@ public class LdapNetworkConnection exten
         // Reset the messageId
         messageId.set( 0 );
 
+        connectorMutex.lock();
+        
         if ( connector != null )
         {
-            connectorMutex.lock();
             connector.dispose();
             connector = null;
-            connectorMutex.unlock();
         }
 
+        connectorMutex.unlock();
+
         clearMaps();
 
         if ( conCloseListeners != null )



Mime
View raw message