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:
commit
24ac241727
|
@ -1,6 +1,6 @@
|
||||||
{application, emqx_bridge_http, [
|
{application, emqx_bridge_http, [
|
||||||
{description, "EMQX HTTP Bridge and Connector Application"},
|
{description, "EMQX HTTP Bridge and Connector Application"},
|
||||||
{vsn, "0.3.2"},
|
{vsn, "0.3.3"},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
{applications, [kernel, stdlib, emqx_resource, ehttpc]},
|
{applications, [kernel, stdlib, emqx_resource, ehttpc]},
|
||||||
{env, [
|
{env, [
|
||||||
|
|
|
@ -640,8 +640,14 @@ on_get_channel_status(
|
||||||
_ChannelId,
|
_ChannelId,
|
||||||
State
|
State
|
||||||
) ->
|
) ->
|
||||||
%% XXX: Reuse the connector status
|
%% N.B.: `on_get_channel_status' expects a different return value than
|
||||||
on_get_status(InstId, State).
|
%% `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}) ->
|
on_format_query_result({ok, Status, Headers, Body}) ->
|
||||||
#{
|
#{
|
||||||
|
|
Loading…
Reference in New Issue