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 2021/07/17 13:13:33 UTC
[directory-studio] branch master updated: Fix connection timeout
setting
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 96d1e34 Fix connection timeout setting
96d1e34 is described below
commit 96d1e3440fd61d85e523745d8ad3fb5b7d46e4e3
Author: Stefan Seelmann <ma...@stefan-seelmann.de>
AuthorDate: Sat Jul 17 15:12:58 2021 +0200
Fix connection timeout setting
---
.../core/io/api/DirectoryApiConnectionWrapper.java | 12 +++++-------
1 file 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 4a82560..049888b 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 )
{