mirror of
https://github.com/processone/ejabberd.git
synced 2024-10-31 15:21:38 +01:00
Halt ejabberd if the top supervisor fails to start
This commit is contained in:
parent
f953621ed2
commit
054413d8f4
@ -60,7 +60,9 @@ start(normal, _Args) ->
|
|||||||
lists:foreach(fun erlang:garbage_collect/1, processes()),
|
lists:foreach(fun erlang:garbage_collect/1, processes()),
|
||||||
{ok, SupPid};
|
{ok, SupPid};
|
||||||
Err ->
|
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;
|
end;
|
||||||
start(_, _) ->
|
start(_, _) ->
|
||||||
{error, badarg}.
|
{error, badarg}.
|
||||||
|
Loading…
Reference in New Issue
Block a user