Skip to content
Snippets Groups Projects
Commit 18aa9a37 authored by brinn's avatar brinn
Browse files

Fix interpretation of LDAP timeout.

SVN: 28180
parent 9e416a9a
No related branches found
No related tags found
No related merge requests found
......@@ -328,13 +328,21 @@ public final class LDAPDirectoryConfiguration
}
/**
* The read timeout (in ms).
* Default value: <code>-1</code> (which means: wait forever)
* The read timeout (in s).
* Default value: <code>10s</code>
*/
public String getTimeoutStr()
{
return Long.toString(timeout / 1000);
}
/**
* Returns the timeout (in ms)
*/
public long getTimeout()
{
return timeout;
}
/**
* Set the read timeout as String in a format understood by
......
......@@ -399,8 +399,8 @@ public final class LDAPPrincipalQuery implements ISelfTestable
env.put(Context.REFERRAL, config.getReferral());
env.put(Context.SECURITY_PRINCIPAL, dn);
env.put(Context.SECURITY_CREDENTIALS, password);
env.put(LDAP_CONTEXT_READ_TIMEOUT, config.getTimeoutStr());
env.put(LDAP_CONTEXT_CONNECT_TIMEOUT, config.getTimeoutStr());
env.put(LDAP_CONTEXT_READ_TIMEOUT, Long.toString(config.getTimeout()));
env.put(LDAP_CONTEXT_CONNECT_TIMEOUT, Long.toString(config.getTimeout()));
if (operationLog.isDebugEnabled())
{
operationLog.debug(String.format("Try to login to %s with dn=%s",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment