Merge pull request #13380 from thalesmg/20240701-r57-fix-http-bridge-hc-return-value

fix(http action): use correct return value for channel health check
This commit is contained in:
Thales Macedo Garitezi 2024-07-02 09:13:53 -03:00 committed by GitHub
commit 24ac241727
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{application, emqx_bridge_http, [
{description, "EMQX HTTP Bridge and Connector Application"},
{vsn, "0.3.2"},
{vsn, "0.3.3"},
{registered, []},
{applications, [kernel, stdlib, emqx_resource, ehttpc]},
{env, [

View File

@ -640,8 +640,14 @@ on_get_channel_status(
_ChannelId,
State
) ->
%% XXX: Reuse the connector status
on_get_status(InstId, State).
%% N.B.: `on_get_channel_status' expects a different return value than
%% `on_get_status'.
case on_get_status(InstId, State, fun default_health_checker/2) of
{Status, _State, Reason} ->
{Status, Reason};
Res ->
Res
end.
on_format_query_result({ok, Status, Headers, Body}) ->
#{