fix(gw): stop xml_object_db process synchronously

This commit is contained in:
JianBo He 2021-12-30 18:29:19 +08:00
parent 2a20f110b9
commit 990514a048
1 changed files with 2 additions and 2 deletions

View File

@ -92,7 +92,7 @@ on_gateway_update(Config, Gateway, GwState = #{ctx := Ctx}) ->
on_gateway_unload(_Gateway = #{ name := GwName,
config := Config
}, _GwState = #{registry := RegPid}) ->
exit(RegPid, kill),
}, _GwState = #{registry := _RegPid}) ->
_ = try emqx_lwm2m_xml_object_db:stop() catch _ : _ -> ok end,
Listeners = emqx_gateway_utils:normalize_config(Config),
emqx_gateway_utils:stop_listeners(GwName, Listeners).