25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

Halt ejabberd if the top supervisor fails to start

This commit is contained in:
Evgeniy Khramtsov 2017-11-14 18:41:28 +03:00
parent f953621ed2
commit 054413d8f4

View File

@ -60,7 +60,9 @@ start(normal, _Args) ->
lists:foreach(fun erlang:garbage_collect/1, processes()),
{ok, SupPid};
Err ->
Err
?CRITICAL_MSG("Failed to start ejabberd application: ~p", [Err]),
timer:sleep(1000),
halt("Refer to ejabberd log files to diagnose the problem")
end;
start(_, _) ->
{error, badarg}.