mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Don't register listeners that failed to start in config reload
This should alleviate some issues in #3850
This commit is contained in:
parent
46c947bc76
commit
06147deccd
@ -457,11 +457,19 @@ config_reloaded() ->
|
||||
ok;
|
||||
{_, OldModule, OldOpts} ->
|
||||
_ = stop_listener(EndPoint, OldModule, OldOpts),
|
||||
ets:insert(?MODULE, {EndPoint, Module, Opts}),
|
||||
start_listener(EndPoint, Module, Opts);
|
||||
case start_listener(EndPoint, Module, Opts) of
|
||||
{ok, _} ->
|
||||
ets:insert(?MODULE, {EndPoint, Module, Opts});
|
||||
_ ->
|
||||
ok
|
||||
end;
|
||||
false ->
|
||||
ets:insert(?MODULE, {EndPoint, Module, Opts}),
|
||||
start_listener(EndPoint, Module, Opts)
|
||||
case start_listener(EndPoint, Module, Opts) of
|
||||
{ok, _} ->
|
||||
ets:insert(?MODULE, {EndPoint, Module, Opts});
|
||||
_ ->
|
||||
ok
|
||||
end
|
||||
end
|
||||
end, New).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user