From 075669461c76aecafc6f6649c196622b75d2fb4a Mon Sep 17 00:00:00 2001 From: zhongwencool Date: Tue, 4 Jan 2022 09:37:32 +0800 Subject: [PATCH] fix: compile error --- apps/emqx_statsd/src/emqx_statsd_api.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/emqx_statsd/src/emqx_statsd_api.erl b/apps/emqx_statsd/src/emqx_statsd_api.erl index 4b6a084eb..ab9416266 100644 --- a/apps/emqx_statsd/src/emqx_statsd_api.erl +++ b/apps/emqx_statsd/src/emqx_statsd_api.erl @@ -59,13 +59,13 @@ statsd(put, #{body := Body}) -> Body, #{rawconf_with_defaults => true, override_to => cluster}) of {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 true -> - ok = emqx_statsd_sup:ensure_child_stopped(?APP), ok = emqx_statsd_sup:ensure_child_started(?APP, maps:get(config, Config)); false -> - ok = emqx_statsd_sup:ensure_child_stopped(?APP) + ok + end, {200, NewConfig}; {error, Reason} -> Message = list_to_binary(io_lib:format("Update config failed ~p", [Reason])),