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

Don't produce a crash on config reload when SQL is not configured

This commit is contained in:
Evgeny Khramtsov 2019-01-12 23:40:33 +03:00
parent 7e8bd484d5
commit 1b0d481f41

View File

@ -98,7 +98,10 @@ stop_host(Host) ->
-spec reload_host(binary()) -> ok.
reload_host(Host) ->
ejabberd_sql_sup:reload(Host).
case needs_sql(Host) of
true -> ejabberd_sql_sup:reload(Host);
false -> ok
end.
%% Returns {true, App} if we have configured sql for the given host
needs_sql(Host) ->