From 03fe0954e42abf00746b8efa4c79ee74cf514427 Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Thu, 27 May 2010 15:10:50 +0000
Subject: [PATCH] Fix an issue with connection timeouts in CLI. The timeout is now configurable on CLI with the --connectTimeout option (expressed in milliseconds), the default is 30 000 milliseconds. This solves Issue 4196.
---
opends/src/quicksetup/org/opends/quicksetup/Application.java | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/Application.java b/opends/src/quicksetup/org/opends/quicksetup/Application.java
index e36874e..baa273c 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/Application.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/Application.java
@@ -774,6 +774,8 @@
* connection.
* @param dn the dn to be used to authenticate.
* @param pwd the pwd to be used to authenticate.
+ * @param timeout the timeout to establish the connection in milliseconds.
+ * Use {@code 0} to express no timeout.
* @param cnx the ordered list of preferred connections to connect to the
* server.
* @return the InitialLdapContext to the remote server.
@@ -781,6 +783,7 @@
*/
protected InitialLdapContext getRemoteConnection(ServerDescriptor server,
String dn, String pwd, ApplicationTrustManager trustManager,
+ int timeout,
LinkedHashSet<PreferredConnection> cnx)
throws ApplicationException
{
@@ -790,7 +793,7 @@
filter.setSearchMonitoringInformation(false);
filter.setSearchBaseDNInformation(false);
ServerLoader loader = new ServerLoader(adsProperties, dn, pwd,
- trustManager, cnx, filter);
+ trustManager, timeout, cnx, filter);
InitialLdapContext ctx = null;
try
--
Gitblit v1.10.0