Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/apache/directory-studio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Seelmann <mail@stefan-seelmann.de>2021-07-17 16:12:58 +0300
committerStefan Seelmann <mail@stefan-seelmann.de>2021-07-17 16:12:58 +0300
commit96d1e3440fd61d85e523745d8ad3fb5b7d46e4e3 (patch)
treef5f3084ddab1b5bee182d929845bf54de850d7c9
parentf869ec4b34f9e5ed18885578d2124704c1d88572 (diff)
Fix connection timeout setting
-rw-r--r--plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java b/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
index 4a8256077..049888b34 100644
--- a/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
+++ b/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
@@ -111,9 +111,6 @@ public class DirectoryApiConnectionWrapper implements ConnectionWrapper
/** The Studio connection */
private Connection connection;
- /** The LDAP connection configuration */
- private LdapConnectionConfig ldapConnectionConfig;
-
/** The LDAP connection */
private LdapNetworkConnection ldapConnection;
@@ -158,7 +155,7 @@ public class DirectoryApiConnectionWrapper implements ConnectionWrapper
{
ldapConnection = null;
- ldapConnectionConfig = new LdapConnectionConfig();
+ LdapConnectionConfig ldapConnectionConfig = new LdapConnectionConfig();
ldapConnectionConfig.setLdapHost( connection.getHost() );
ldapConnectionConfig.setLdapPort( connection.getPort() );
@@ -235,6 +232,10 @@ public class DirectoryApiConnectionWrapper implements ConnectionWrapper
ldapConnectionUnderConstruction.startTls();
}
+ // Set original timeout again
+ ldapConnectionConfig.setTimeout( oldTimeout );
+ ldapConnectionUnderConstruction.setTimeOut( oldTimeout );
+
// Now set the LDAP connection once the (optional) security layer is in place
ldapConnection = ldapConnectionUnderConstruction;
@@ -251,9 +252,6 @@ public class DirectoryApiConnectionWrapper implements ConnectionWrapper
throw new Exception( Messages.DirectoryApiConnectionWrapper_UnsecuredConnection );
}
}
-
- // Set old timeout again
- ldapConnectionConfig.setTimeout( oldTimeout );
}
catch ( Exception e )
{