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
1 changed files with 4 additions and 1 deletions

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) ->