diff options
Diffstat (limited to 'lib/eldap/src/eldap.erl')
-rw-r--r-- | lib/eldap/src/eldap.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/eldap/src/eldap.erl b/lib/eldap/src/eldap.erl index 7c9c02d681..d144aac872 100644 --- a/lib/eldap/src/eldap.erl +++ b/lib/eldap/src/eldap.erl @@ -352,9 +352,14 @@ parse_args([], _, Data) -> try_connect([Host|Hosts], Data) -> TcpOpts = [{packet, asn1}, {active,false}], - case do_connect(Host, Data, TcpOpts) of + try do_connect(Host, Data, TcpOpts) of {ok,Fd} -> {ok,Data#eldap{host = Host, fd = Fd}}; - _ -> try_connect(Hosts, Data) + Err -> + log2(Data, "Connect: ~p failed ~p~n",[Host, Err]), + try_connect(Hosts, Data) + catch _:Err -> + log2(Data, "Connect: ~p failed ~p~n",[Host, Err]), + try_connect(Hosts, Data) end; try_connect([],_) -> {error,"connect failed"}. |