fix(rule): dead lock when update configs for rules
This commit is contained in:
parent
626a4c4713
commit
94a5965560
|
@ -43,7 +43,7 @@ init_per_suite(Config) ->
|
||||||
%%
|
%%
|
||||||
application:unload(emqx_authz),
|
application:unload(emqx_authz),
|
||||||
|
|
||||||
emqx_common_test_helpers:start_apps([]),
|
emqx_common_test_helpers:start_apps([emqx_conf]),
|
||||||
Config.
|
Config.
|
||||||
|
|
||||||
end_per_suite(_Config) ->
|
end_per_suite(_Config) ->
|
||||||
|
|
|
@ -187,11 +187,11 @@ init([]) ->
|
||||||
{ok, #{}}.
|
{ok, #{}}.
|
||||||
|
|
||||||
handle_call({insert_rule, Rule}, _From, State) ->
|
handle_call({insert_rule, Rule}, _From, State) ->
|
||||||
_ = emqx_plugin_libs_rule:cluster_call(?MODULE, do_insert_rule, [Rule]),
|
do_insert_rule(Rule),
|
||||||
{reply, ok, State};
|
{reply, ok, State};
|
||||||
|
|
||||||
handle_call({delete_rule, Rule}, _From, State) ->
|
handle_call({delete_rule, Rule}, _From, State) ->
|
||||||
_ = emqx_plugin_libs_rule:cluster_call(?MODULE, do_delete_rule, [Rule]),
|
do_delete_rule(Rule),
|
||||||
{reply, ok, State};
|
{reply, ok, State};
|
||||||
|
|
||||||
handle_call(Req, _From, State) ->
|
handle_call(Req, _From, State) ->
|
||||||
|
|
Loading…
Reference in New Issue