From 6673b675b93de3e5466b18c7c8cd848b9dc6ec0a Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Wed, 8 Feb 2012 12:47:12 +0100 Subject: [inets/httpc] Connect error info improvement --- lib/inets/src/http_client/httpc_handler.erl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib/inets/src/http_client/httpc_handler.erl') 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 -- cgit v1.2.3