24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-16 22:05:29 +02:00

Don't overwrite listeners for different transports in config merging

Before this having listeners on same port for both tcp and udp would after
config merging step left only one of them.

Many thanks to Holger Weiß for noticing this.
This commit is contained in:
Paweł Chmielowski 2015-08-19 10:14:09 +02:00
parent f89db30d77
commit 6f0ee83317

View File

@ -370,7 +370,10 @@ exit_or_halt(ExitText) ->
get_config_option_key(Name, Val) ->
if Name == listen ->
lists:keyfind(port, 1, Val);
case {lists:keyfind(port, 1, Val), lists:keyfind(transport, 1, Val)} of
{{_, Port}, false} -> {Port, tcp};
{{_, Port2}, {_, Trans}} -> {Port2, Trans}
end;
is_tuple(Val) ->
element(1, Val);
true ->