You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2018/05/20 09:05:17 UTC

[directory-studio] branch master updated: Don't set timeout for LDAPS with JNDI

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 81810d4  Don't set timeout for LDAPS with JNDI
81810d4 is described below

commit 81810d42359d5e9a934f9cf9e518406d98058067
Author: Stefan Seelmann <ma...@stefan-seelmann.de>
AuthorDate: Sun May 20 11:05:09 2018 +0200

    Don't set timeout for LDAPS with JNDI
---
 .../connection/core/io/jndi/JNDIConnectionWrapper.java      | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java b/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
index 9e7f3cd..5c961d9 100644
--- a/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
+++ b/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
@@ -839,22 +839,19 @@ public class JNDIConnectionWrapper implements ConnectionWrapper
         environment.put( JAVA_NAMING_LDAP_VERSION, "3" ); //$NON-NLS-1$
 
         // timeouts
-        // Don't use a timeout when using ldaps: JNDI throws a SocketException 
-        // when setting a timeout on SSL connections.
+        /*
+         *  Don't use a timeout when using ldaps: JNDI throws a SocketException  when setting a timeout on SSL connections.
+         *  See https://bugs.openjdk.java.net/browse/JDK-8173451
+         */
         if ( !useLdaps )
         {
-            environment.put( COM_SUN_JNDI_LDAP_CONNECT_TIMEOUT, "10000" ); //$NON-NLS-1$
-        }
-        else
-        {
             if ( timeout < 0 )
             {
                 timeout = 0;
             }
-            
             environment.put( COM_SUN_JNDI_LDAP_CONNECT_TIMEOUT, Long.toString( timeout ) ); //$NON-NLS-1$
         }
-        
+
         environment.put( COM_SUN_JNDI_DNS_TIMEOUT_INITIAL, "2000" ); //$NON-NLS-1$
         environment.put( COM_SUN_JNDI_DNS_TIMEOUT_RETRIES, "3" ); //$NON-NLS-1$
 

-- 
To stop receiving notification emails like this one, please contact
seelmann@apache.org.