directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1491248 - /directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
Date Sun, 09 Jun 2013 17:11:12 GMT
Author: elecharny
Date: Sun Jun  9 17:11:12 2013
New Revision: 1491248

URL: http://svn.apache.org/r1491248
Log:
Converted the SearchRequest timeout to ms, as we need ms in the LdapNetworkConnection (see
DIRAPI-144)

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=1491248&r1=1491247&r2=1491248&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
Sun Jun  9 17:11:12 2013
@@ -323,13 +323,16 @@ public class LdapNetworkConnection exten
         {
             return ( timeout <= 0 ) ? Long.MAX_VALUE : timeout;
         }
-        else if ( timeout <= 0 )
+
+        long timeoutMs = clientTimeout * 1000L;
+
+        if ( timeout <= 0 )
         {
-            return clientTimeout;
+            return timeoutMs;
         }
         else
         {
-            return timeout < clientTimeout ? timeout : clientTimeout;
+            return timeout < timeoutMs ? timeout : timeoutMs;
         }
     }
 
@@ -1157,7 +1160,7 @@ public class LdapNetworkConnection exten
         {
             startTls();
         }
-        
+
         // If the session has not been establish, or is closed, we get out immediately
         checkSession();
 



Mime
View raw message