diff options
author | Micael Karlberg <[email protected]> | 2012-02-08 12:47:12 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2012-02-08 12:47:12 +0100 |
commit | 6673b675b93de3e5466b18c7c8cd848b9dc6ec0a (patch) | |
tree | 0ef1580b7e1357bf6b589e54d8161edec7e95ccc /lib/inets/src/http_client | |
parent | c67df603f88f1cd41c35bfb1d663978864689fe9 (diff) | |
download | otp-6673b675b93de3e5466b18c7c8cd848b9dc6ec0a.tar.gz otp-6673b675b93de3e5466b18c7c8cd848b9dc6ec0a.tar.bz2 otp-6673b675b93de3e5466b18c7c8cd848b9dc6ec0a.zip |
[inets/httpc] Connect error info improvement
Diffstat (limited to 'lib/inets/src/http_client')
-rw-r--r-- | lib/inets/src/http_client/httpc_handler.erl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/inets/src/http_client/httpc_handler.erl b/lib/inets/src/http_client/httpc_handler.erl index 714fd6f16d..b8c34bd99b 100644 --- a/lib/inets/src/http_client/httpc_handler.erl +++ b/lib/inets/src/http_client/httpc_handler.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2002-2011. All Rights Reserved. +%% Copyright Ericsson AB 2002-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -851,14 +851,16 @@ connect(SocketType, ToAddress, case IpFamily of inet6fb4 -> Opts3 = [inet6 | Opts2], - case http_transport:connect(SocketType, ToAddress, Opts3, Timeout) of + case http_transport:connect(SocketType, + ToAddress, Opts3, Timeout) of {error, Reason6} -> Opts4 = [inet | Opts2], case http_transport:connect(SocketType, ToAddress, Opts4, Timeout) of {error, Reason4} -> {error, {failed_connect, - [{inet6, Opts3, Reason6}, + [{to_address, ToAddress}, + {inet6, Opts3, Reason6}, {inet, Opts4, Reason4}]}}; OK -> OK @@ -870,7 +872,8 @@ connect(SocketType, ToAddress, Opts3 = [IpFamily | Opts2], case http_transport:connect(SocketType, ToAddress, Opts3, Timeout) of {error, Reason} -> - {error, {failed_connect, [{IpFamily, Opts3, Reason}]}}; + {error, {failed_connect, [{to_address, ToAddress}, + {IpFamily, Opts3, Reason}]}}; Else -> Else end |