fix(ipv6): fix wss ipv6 problem
This commit is contained in:
parent
87780c1c1b
commit
aca3053a7d
|
@ -1862,14 +1862,21 @@ end}.
|
|||
|
||||
TcpListeners = fun(Type, Name) ->
|
||||
Prefix = string:join(["listener", Type, Name], "."),
|
||||
case cuttlefish:conf_get(Prefix, Conf, undefined) of
|
||||
ListenOnN = case cuttlefish:conf_get(Prefix, Conf, undefined) of
|
||||
undefined -> [];
|
||||
ListenOn ->
|
||||
[{Atom(Type), ListenOn, [{deflate_options, DeflateOpts(Prefix)},
|
||||
{tcp_options, TcpOpts(Prefix)} | LisOpts(Prefix)]}]
|
||||
case ListenOn of
|
||||
{Ip, Port} ->
|
||||
case inet:parse_address(Ip) of
|
||||
{ok ,R} -> {R, Port};
|
||||
_ -> {Ip, Port}
|
||||
end;
|
||||
Other -> Other
|
||||
end
|
||||
end,
|
||||
|
||||
[{Atom(Type), ListenOnN, [{deflate_options, DeflateOpts(Prefix)},
|
||||
{tcp_options, TcpOpts(Prefix)} | LisOpts(Prefix)]}]
|
||||
end,
|
||||
SslListeners = fun(Type, Name) ->
|
||||
Prefix = string:join(["listener", Type, Name], "."),
|
||||
case cuttlefish:conf_get(Prefix, Conf, undefined) of
|
||||
|
|
Loading…
Reference in New Issue