Przeglądaj źródła

fix: can't shutdown emqx_config_handler process.

Zhongwen Deng 4 lat temu
rodzic
commit
da7bda3540
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      apps/emqx/src/emqx_config_handler.erl

+ 3 - 0
apps/emqx/src/emqx_config_handler.erl

@@ -139,6 +139,9 @@ handle_cast(_Msg, State) ->
 handle_info(_Info, State) ->
 handle_info(_Info, State) ->
     {noreply, State}.
     {noreply, State}.
 
 
+%% application shutdown, we can't call application_controller here.
+terminate(shutdown, _) ->
+    ok;
 terminate(_Reason, #{handlers := Handlers}) ->
 terminate(_Reason, #{handlers := Handlers}) ->
     save_handlers(Handlers),
     save_handlers(Handlers),
     ok.
     ok.