fix(statsd): update config bug
This commit is contained in:
parent
7bc59969eb
commit
e908973a86
|
@ -61,10 +61,8 @@ statsd(put, #{body := Body}) ->
|
||||||
{ok, #{raw_config := NewConfig, config := Config}} ->
|
{ok, #{raw_config := NewConfig, config := Config}} ->
|
||||||
ok = emqx_statsd_sup:ensure_child_stopped(?APP),
|
ok = emqx_statsd_sup:ensure_child_stopped(?APP),
|
||||||
case maps:get(<<"enable">>, Body) of
|
case maps:get(<<"enable">>, Body) of
|
||||||
true ->
|
true -> emqx_statsd_sup:ensure_child_started(?APP, Config);
|
||||||
ok = emqx_statsd_sup:ensure_child_started(?APP, maps:get(config, Config));
|
false -> ok
|
||||||
false ->
|
|
||||||
ok
|
|
||||||
end,
|
end,
|
||||||
{200, NewConfig};
|
{200, NewConfig};
|
||||||
{error, Reason} ->
|
{error, Reason} ->
|
||||||
|
|
Loading…
Reference in New Issue