From b8cb31c0ff9a4a80fe5a4a4e60332745bc225c77 Mon Sep 17 00:00:00 2001 From: JianBo He Date: Tue, 17 Aug 2021 14:41:21 +0800 Subject: [PATCH] fix(gw): fix the bad return value for initiating chain --- apps/emqx_gateway/src/emqx_gateway_insta_sup.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/emqx_gateway/src/emqx_gateway_insta_sup.erl b/apps/emqx_gateway/src/emqx_gateway_insta_sup.erl index 404766719..2edccd033 100644 --- a/apps/emqx_gateway/src/emqx_gateway_insta_sup.erl +++ b/apps/emqx_gateway/src/emqx_gateway_insta_sup.erl @@ -232,9 +232,9 @@ create_authenticators_for_gateway_insta(GwName, AuthCfgs) -> NResults /= [] andalso begin logger:error("Failed to create authenticators: ~p", [NResults]), throw({bad_autheticators, NResults}) - end, ok; + end, ChainId; {error, Reason} -> - logger:error("Failed to create authenticator chain: ~p", [Reason]), + logger:error("Failed to create authentication chain: ~p", [Reason]), throw({bad_chain, {ChainId, Reason}}) end. @@ -244,10 +244,10 @@ cleanup_authenticators_for_gateway_insta(ChainId) -> case emqx_authn:delete_chain(ChainId) of ok -> ok; {error, {not_found, _}} -> - logger:warning("Failed to clean authenticator chain: ~s, " + logger:warning("Failed to clean authentication chain: ~s, " "reason: not_found", [ChainId]); {error, Reason} -> - logger:error("Failed to clean authenticator chain: ~s, " + logger:error("Failed to clean authentication chain: ~s, " "reason: ~p", [ChainId, Reason]) end.