fix(emqx_slow_subs): trap the exit message

This commit is contained in:
lafirest 2022-02-08 18:28:00 +08:00
parent 4a6ddce43c
commit 252514bfe0
1 changed files with 2 additions and 1 deletions

View File

@ -133,6 +133,7 @@ init_tab() ->
%%--------------------------------------------------------------------
init([Conf]) ->
erlang:process_flag(trap_exit, true),
expire_tick(Conf),
load(Conf),
{ok, #{config => Conf,
@ -201,7 +202,7 @@ load(Cfg) ->
ok.
unload() ->
emqx:unhook('delivery.completed', fun ?MODULE:on_delivery_completed/4 ),
emqx:unhook('delivery.completed', fun ?MODULE:on_delivery_completed/4),
do_clear_history().
do_clear(Cfg, Logs) ->