From 032a49114c74eec9109ddf8601882e0a58ca5cf7 Mon Sep 17 00:00:00 2001 From: Zaiming Shi Date: Fri, 6 Aug 2021 12:15:20 +0200 Subject: [PATCH] fix(emqx_machine): start terminator in emqx_machine_app --- apps/emqx_machine/src/emqx_machine.erl | 4 +--- apps/emqx_machine/src/emqx_machine_app.erl | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/emqx_machine/src/emqx_machine.erl b/apps/emqx_machine/src/emqx_machine.erl index 229e8ca7e..fcf8d3239 100644 --- a/apps/emqx_machine/src/emqx_machine.erl +++ b/apps/emqx_machine/src/emqx_machine.erl @@ -51,9 +51,7 @@ start() -> ok = print_vsn(), - ok = start_autocluster(), - %% NOTE: keep this to the end - ok = emqx_machine_terminator:start(). + ok = start_autocluster(). graceful_shutdown() -> emqx_machine_terminator:graceful_wait(). diff --git a/apps/emqx_machine/src/emqx_machine_app.erl b/apps/emqx_machine/src/emqx_machine_app.erl index 9a9b13d8f..609df37d1 100644 --- a/apps/emqx_machine/src/emqx_machine_app.erl +++ b/apps/emqx_machine/src/emqx_machine_app.erl @@ -24,7 +24,9 @@ start(_Type, _Args) -> ok = emqx_machine:start(), - emqx_machine_sup:start_link(). + {ok, Sup} = emqx_machine_sup:start_link(), + ok = emqx_machine_terminator:start(), + {ok, Sup}. stop(_State) -> ok.