Merge pull request #7740 from DDDHuang/statsd_pro_restart

fix: statsd & prometheus update config with restart & stop
This commit is contained in:
DDDHuang 2022-04-24 16:44:01 +08:00 committed by GitHub
commit f661d3d17b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -95,8 +95,8 @@ stop() ->
ok.
restart() ->
stop(),
stop().
ok = stop(),
ok = start().
do_start() ->
emqx_prometheus_sup:start_child(?APP, emqx_conf:get([prometheus])).

View File

@ -70,9 +70,9 @@ update(Config) ->
ok = stop(),
case maps:get(<<"enable">>, Config, true) of
true ->
ok = start();
ok = restart();
false ->
ignore
ok = stop()
end,
{ok, NewConfigRows};
{error, Reason} ->