fix(ft): unload conf hooks in `prep_stop`

In order to avoid situations when the root supervisor is stopped
already.
This commit is contained in:
Andrew Mayorov 2023-05-12 14:36:35 +03:00 committed by Ilya Averyanov
parent d2bea433f5
commit 27ab9c62d8
1 changed files with 5 additions and 2 deletions

View File

@ -18,13 +18,16 @@
-behaviour(application).
-export([start/2, stop/1]).
-export([start/2, prep_stop/1, stop/1]).
start(_StartType, _StartArgs) ->
{ok, Sup} = emqx_ft_sup:start_link(),
ok = emqx_ft_conf:load(),
{ok, Sup}.
stop(_State) ->
prep_stop(State) ->
ok = emqx_ft_conf:unload(),
State.
stop(_State) ->
ok.