From da3797589463002f28fc42ef27872650fe1de938 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Wed, 20 Feb 2013 17:18:43 +0100 Subject: inets httpd: Handle ipfamily option correctly when listning to port 0 --- lib/inets/src/http_server/httpd_sup.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/inets/src/http_server/httpd_sup.erl') diff --git a/lib/inets/src/http_server/httpd_sup.erl b/lib/inets/src/http_server/httpd_sup.erl index 8ee2661b04..3b1e16cf78 100644 --- a/lib/inets/src/http_server/httpd_sup.erl +++ b/lib/inets/src/http_server/httpd_sup.erl @@ -247,8 +247,9 @@ listen(Address, Port, Config) -> SocketType -> case http_transport:start(SocketType) of ok -> - Fd = proplists:get_value(fd, Config), - case http_transport:listen(SocketType, Address, Port, Fd) of + Fd = proplists:get_value(fd, Config), + IpFamily = proplists:get_value(ipfamily, Config, inet6fb4), + case http_transport:listen(SocketType, Address, Port, Fd, IpFamily) of {ok, ListenSocket} -> NewConfig = proplists:delete(port, Config), {NewPort, _} = http_transport:sockname(SocketType, ListenSocket), -- cgit v1.2.3