diff --git a/apps/emqx_gateway/src/emqx_gateway_conf.erl b/apps/emqx_gateway/src/emqx_gateway_conf.erl index d89c518a1..1d3500b09 100644 --- a/apps/emqx_gateway/src/emqx_gateway_conf.erl +++ b/apps/emqx_gateway/src/emqx_gateway_conf.erl @@ -365,7 +365,7 @@ pre_config_update(UnknownReq, _RawConf) -> emqx_config:config(), emqx_config:app_envs()) -> ok | {ok, Result::any()} | {error, Reason::term()}. -post_config_update(Req, NewConfig, OldConfig, _AppEnvs) -> +post_config_update(Req, NewConfig, OldConfig, _AppEnvs) when is_tuple(Req) -> [_Tag, GwName0|_] = tuple_to_list(Req), GwName = binary_to_existing_atom(GwName0), @@ -379,4 +379,6 @@ post_config_update(Req, NewConfig, OldConfig, _AppEnvs) -> emqx_gateway:load(GwName, New); {New, Old} when is_map(New), is_map(Old) -> emqx_gateway:update(GwName, New) - end. + end; +post_config_update(_Req, _NewConfig, _OldConfig, _AppEnvs) -> + ok. diff --git a/apps/emqx_gateway/test/emqx_coap_SUITE.erl b/apps/emqx_gateway/test/emqx_coap_SUITE.erl index db27de1fe..6a6fda09f 100644 --- a/apps/emqx_gateway/test/emqx_coap_SUITE.erl +++ b/apps/emqx_gateway/test/emqx_coap_SUITE.erl @@ -58,6 +58,7 @@ set_special_cfg(_) -> ok. end_per_suite(Config) -> + {ok, _} = emqx:remove_config([<<"gateway">>,<<"coap">>]), emqx_common_test_helpers:stop_apps([emqx_gateway]), Config. diff --git a/apps/emqx_gateway/test/emqx_exproto_SUITE.erl b/apps/emqx_gateway/test/emqx_exproto_SUITE.erl index 280699cef..993ed4975 100644 --- a/apps/emqx_gateway/test/emqx_exproto_SUITE.erl +++ b/apps/emqx_gateway/test/emqx_exproto_SUITE.erl @@ -60,6 +60,7 @@ init_per_group(GrpName, Cfg) -> [{servers, Svrs}, {listener_type, GrpName} | Cfg]. end_per_group(_, Cfg) -> + {ok, _} = emqx:remove_config([gateway, exproto]), emqx_common_test_helpers:stop_apps([emqx_gateway]), emqx_exproto_echo_svr:stop(proplists:get_value(servers, Cfg)). diff --git a/apps/emqx_gateway/test/emqx_sn_protocol_SUITE.erl b/apps/emqx_gateway/test/emqx_sn_protocol_SUITE.erl index aac2f0d35..831b0d72f 100644 --- a/apps/emqx_gateway/test/emqx_sn_protocol_SUITE.erl +++ b/apps/emqx_gateway/test/emqx_sn_protocol_SUITE.erl @@ -87,6 +87,7 @@ init_per_suite(Config) -> Config. end_per_suite(_) -> + {ok, _} = emqx:remove_config([gateway, mqttsn]), emqx_common_test_helpers:stop_apps([emqx_gateway]). %%--------------------------------------------------------------------