aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_lib
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2010-12-01 10:29:56 +0100
committerIngela Anderton Andin <[email protected]>2010-12-01 10:29:56 +0100
commit01d4dde5a47b820f24bea09ec96fb17aabb4d27c (patch)
treebc8242aa9b0d8cf1e0180f229732c7a264818ed2 /lib/inets/src/http_lib
parent6a0877cc8ff8157e055d6216dfee2293c648601c (diff)
parentdbc3c1f73de77191477f2325a23ea0e3bf456e9f (diff)
downloadotp-01d4dde5a47b820f24bea09ec96fb17aabb4d27c.tar.gz
otp-01d4dde5a47b820f24bea09ec96fb17aabb4d27c.tar.bz2
otp-01d4dde5a47b820f24bea09ec96fb17aabb4d27c.zip
Merge branch 'ia/ssl/test-improvments' into dev
Diffstat (limited to 'lib/inets/src/http_lib')
-rw-r--r--lib/inets/src/http_lib/http_transport.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/inets/src/http_lib/http_transport.erl b/lib/inets/src/http_lib/http_transport.erl
index b8121852b8..0024d19fc1 100644
--- a/lib/inets/src/http_lib/http_transport.erl
+++ b/lib/inets/src/http_lib/http_transport.erl
@@ -192,24 +192,31 @@ listen_ip_comm(Addr, Port) ->
case IpFamily of
inet6fb4 ->
Opts2 = [inet6 | Opts],
+ ?hlrt("try ipv6 listen", [{port, NewPort}, {opts, Opts2}]),
case (catch gen_tcp:listen(NewPort, Opts2)) of
{error, Reason} when ((Reason =:= nxdomain) orelse
(Reason =:= eafnosupport)) ->
Opts3 = [inet | Opts],
+ ?hlrt("ipv6 listen failed - try ipv4 instead",
+ [{reason, Reason}, {port, NewPort}, {opts, Opts3}]),
gen_tcp:listen(NewPort, Opts3);
%% This is when a given hostname has resolved to a
%% IPv4-address. The inet6-option together with a
%% {ip, IPv4} option results in badarg
- {'EXIT', _} ->
+ {'EXIT', Reason} ->
Opts3 = [inet | Opts],
+ ?hlrt("ipv6 listen exit - try ipv4 instead",
+ [{reason, Reason}, {port, NewPort}, {opts, Opts3}]),
gen_tcp:listen(NewPort, Opts3);
Other ->
+ ?hlrt("ipv6 listen done", [{other, Other}]),
Other
end;
_ ->
Opts2 = [IpFamily | Opts],
+ ?hlrt("listen", [{port, NewPort}, {opts, Opts2}]),
gen_tcp:listen(NewPort, Opts2)
end.