<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hello,<br>
<br>
I'm using ldaps protocol to communicate with LDAP Server<br>
<br>
Handle = case eldap:open([LDAPHost], [{port, LDAPPort}, {timeout,
Timeout}, {log, LogFun}, {ssl, true}, {sslopts, [{verify,
verify_peer}, {reuse_sessions, false}, {cacertfile, CertFile}]}]) of<br>
{ok, H} -> H;<br>
Error -> ?DEBUG("Open Error: [~p]~n", [Error]),<br>
error(Error)<br>
end,<br>
<br>
When LDAP on LDAPHost:LDAPPort is not working and cannot respond for
request this function hangs for about 3 minutes (although the
Timeout is set to 1000 (1 sec.)) and then returns with {error,
etimedout}.<br>
<br>
I made some investigations and the root cause of this seems to be
function from eldap:<br>
<br>
do_connect(Host, Data, Opts) when Data#eldap.ldaps == false -><br>
gen_tcp:connect(Host, Data#eldap.port, Opts,
Data#eldap.timeout);<br>
do_connect(Host, Data, Opts) when Data#eldap.ldaps == true -><br>
ssl:connect(Host, Data#eldap.port, Opts++Data#eldap.tls_opts).<br>
<br>
It does not use timeout when connecting using SSL.<br>
<br>
I guess It need fixing is next release.<br>
<br>
But there is an additional question:<br>
<br>
Due to agreement with user we cannot change any part of OTP
Distributions. Only official releases of OTP can be used.<br>
Is it possible to workaround the problem without updating eldap.erl
and recompiling OTP ?<br>
<br>
<div class="moz-signature">-- <br>
<span style="font-family: Arial, Helvetica, sans-serif; font-size:
9pt; color: #4d4d4d;">
<strong>Wiesław Bieniek</strong><br>
Projektant Telco BSS R&D<br>
<br>
tel. +48 12 646 12 66<br>
website: <a href="http://www.comarch.pl">www.comarch.pl</a>
</span></div>
</body>
</html>