fix: compile error

This commit is contained in:
zhongwencool 2022-01-04 09:37:32 +08:00
parent 33523d9294
commit 075669461c
1 changed files with 3 additions and 3 deletions

View File

@ -59,13 +59,13 @@ statsd(put, #{body := Body}) ->
Body, Body,
#{rawconf_with_defaults => true, override_to => cluster}) of #{rawconf_with_defaults => true, override_to => cluster}) of
{ok, #{raw_config := NewConfig, config := Config}} -> {ok, #{raw_config := NewConfig, config := Config}} ->
_ = emqx_statsd_sup:stop_child(?APP), ok = emqx_statsd_sup:ensure_child_stopped(?APP),
case maps:get(<<"enable">>, Body) of case maps:get(<<"enable">>, Body) of
true -> true ->
ok = emqx_statsd_sup:ensure_child_stopped(?APP),
ok = emqx_statsd_sup:ensure_child_started(?APP, maps:get(config, Config)); ok = emqx_statsd_sup:ensure_child_started(?APP, maps:get(config, Config));
false -> false ->
ok = emqx_statsd_sup:ensure_child_stopped(?APP) ok
end,
{200, NewConfig}; {200, NewConfig};
{error, Reason} -> {error, Reason} ->
Message = list_to_binary(io_lib:format("Update config failed ~p", [Reason])), Message = list_to_binary(io_lib:format("Update config failed ~p", [Reason])),