diff options
author | Micael Karlberg <[email protected]> | 2012-02-06 15:26:28 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2012-02-06 15:26:28 +0100 |
commit | b2eeb740c6e013055603aaaee1570550d380b720 (patch) | |
tree | e332e7f1270c6de2103fc7d163999a27ba4e40e8 /lib/inets/src/http_client/httpc_handler.erl | |
parent | dcf35c1ef914f7473bb64fa9175af2cf42744885 (diff) | |
parent | 0d580acdc51bd88a0d364b76ac35fcf2506c2d9e (diff) | |
download | otp-b2eeb740c6e013055603aaaee1570550d380b720.tar.gz otp-b2eeb740c6e013055603aaaee1570550d380b720.tar.bz2 otp-b2eeb740c6e013055603aaaee1570550d380b720.zip |
Merge branch 'bmk/inets/httpc/checking_ipv6_on_windows' into bmk/inets/inets59_integration
Diffstat (limited to 'lib/inets/src/http_client/httpc_handler.erl')
-rw-r--r-- | lib/inets/src/http_client/httpc_handler.erl | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/inets/src/http_client/httpc_handler.erl b/lib/inets/src/http_client/httpc_handler.erl index bfe9b14ef6..714fd6f16d 100644 --- a/lib/inets/src/http_client/httpc_handler.erl +++ b/lib/inets/src/http_client/httpc_handler.erl @@ -852,13 +852,14 @@ connect(SocketType, ToAddress, inet6fb4 -> Opts3 = [inet6 | Opts2], case http_transport:connect(SocketType, ToAddress, Opts3, Timeout) of - {error, _Reason} = Error -> + {error, Reason6} -> Opts4 = [inet | Opts2], case http_transport:connect(SocketType, ToAddress, Opts4, Timeout) of - {error, _} -> - %% Reply with the "original" error - Error; + {error, Reason4} -> + {error, {failed_connect, + [{inet6, Opts3, Reason6}, + {inet, Opts4, Reason4}]}}; OK -> OK end; @@ -867,7 +868,12 @@ connect(SocketType, ToAddress, end; _ -> Opts3 = [IpFamily | Opts2], - http_transport:connect(SocketType, ToAddress, Opts3, Timeout) + case http_transport:connect(SocketType, ToAddress, Opts3, Timeout) of + {error, Reason} -> + {error, {failed_connect, [{IpFamily, Opts3, Reason}]}}; + Else -> + Else + end end. connect_and_send_first_request(Address, Request, #state{options = Options} = State) -> |