diff options
author | Ingela Anderton Andin <[email protected]> | 2013-02-20 17:18:43 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2013-02-20 17:18:43 +0100 |
commit | da3797589463002f28fc42ef27872650fe1de938 (patch) | |
tree | 381d366a095356098b6487d24a8d22604de473fa /lib/inets/src/http_server/httpd_sup.erl | |
parent | baca1b6cf223b03786ea47fc101f4249bda3cb3c (diff) | |
download | otp-da3797589463002f28fc42ef27872650fe1de938.tar.gz otp-da3797589463002f28fc42ef27872650fe1de938.tar.bz2 otp-da3797589463002f28fc42ef27872650fe1de938.zip |
inets httpd: Handle ipfamily option correctly when listning to port 0
Diffstat (limited to 'lib/inets/src/http_server/httpd_sup.erl')
-rw-r--r-- | lib/inets/src/http_server/httpd_sup.erl | 5 |
1 files changed, 3 insertions, 2 deletions
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), |