Commit 6f0eee41 authored by speedy01's avatar speedy01

OF-887 ldap.readTimeout not used when LDAP getContext() is called for queries

Added readtimeout and connect time out to getcontext
parent 99de4bd3
...@@ -534,7 +534,15 @@ public class LdapManager { ...@@ -534,7 +534,15 @@ public class LdapManager {
} else { } else {
env.put("com.sun.jndi.ldap.connect.pool", "false"); env.put("com.sun.jndi.ldap.connect.pool", "false");
} }
if (connTimeout > 0) {
env.put("com.sun.jndi.ldap.connect.timeout", String.valueOf(connTimeout));
} else {
env.put("com.sun.jndi.ldap.connect.timeout", "10000");
}
if (readTimeout > 0) {
env.put("com.sun.jndi.ldap.read.timeout", String.valueOf(readTimeout));
}
if (followReferrals) { if (followReferrals) {
env.put(Context.REFERRAL, "follow"); env.put(Context.REFERRAL, "follow");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment