fix(dialyzer): unmatched results in emqx_statsd_api
This commit is contained in:
parent
925d46fe86
commit
59e2614574
|
@ -59,12 +59,10 @@ 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),
|
||||||
case maps:get(<<"enable">>, Body) of
|
case maps:get(<<"enable">>, Body) of
|
||||||
true ->
|
true -> emqx_statsd_sup:start_child(?APP, maps:get(config, Config));
|
||||||
_ = emqx_statsd_sup:stop_child(?APP),
|
false -> ok
|
||||||
emqx_statsd_sup:start_child(?APP, maps:get(config, Config));
|
|
||||||
false ->
|
|
||||||
_ = emqx_statsd_sup:stop_child(?APP)
|
|
||||||
end,
|
end,
|
||||||
{200, NewConfig};
|
{200, NewConfig};
|
||||||
{error, Reason} ->
|
{error, Reason} ->
|
||||||
|
|
Loading…
Reference in New Issue