Browse Source

fix: reset config not work in cluster

Zhongwen Deng 3 years atrás
parent
commit
bfdd86b3fd

+ 0 - 2
apps/emqx_dashboard/src/emqx_dashboard_config.erl

@@ -94,8 +94,6 @@ post_config_update(_, _Req, NewConf, OldConf, _AppEnvs) ->
     {StopHttps, StartHttps} = diff_listeners(https, OldHttps, NewHttps),
     Stop = maps:merge(StopHttp, StopHttps),
     Start = maps:merge(StartHttp, StartHttps),
-    ?SLOG(error, Stop#{action => stop}),
-    ?SLOG(error, Start#{acton => start}),
     _ = erlang:send_after(500, ?MODULE, {update_listeners, Stop, Start}),
     ok.
 

+ 1 - 1
apps/emqx_management/src/emqx_mgmt_api_configs.erl

@@ -250,7 +250,7 @@ global_zone_configs(put, #{body := Body}, _Req) ->
 config_reset(post, _Params, Req) ->
     %% reset the config specified by the query string param 'conf_path'
     Path = conf_path_reset(Req) ++ conf_path_from_querystr(Req),
-    case emqx:reset_config(Path, #{}) of
+    case emqx_conf:reset(Path, ?OPTS) of
         {ok, _} ->
             {200};
         {error, no_default_value} ->