diff options
author | Dan Gudmundsson <[email protected]> | 2012-03-20 14:25:52 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2012-03-21 10:02:56 +0100 |
commit | f562e0fc077e546c2b905a7469999fc8419a0aec (patch) | |
tree | 4dd9622e39d1ccd1026b688d301d890037f390f7 /lib/eldap/src/eldap.erl | |
parent | d8dbf15de4fa1a08b9a05e7d8e08fdb025fe1dc3 (diff) | |
download | otp-f562e0fc077e546c2b905a7469999fc8419a0aec.tar.gz otp-f562e0fc077e546c2b905a7469999fc8419a0aec.tar.bz2 otp-f562e0fc077e546c2b905a7469999fc8419a0aec.zip |
[eldap] Add infrastructure
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"}. |