Don't produce a crash on config reload when SQL is not configured
This commit is contained in:
parent
7e8bd484d5
commit
1b0d481f41
|
@ -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) ->
|
||||
|
|
Loading…
Reference in New Issue