Merge pull request #13001 from lafirest/fix/sysk_reconn
fix(sysk): fix that the syskeeper forwarding never reconnecting
This commit is contained in:
commit
da7b11020a
|
@ -213,9 +213,9 @@ on_get_status(_InstanceId, #{pool_name := Pool, ack_timeout := AckTimeout}) ->
|
||||||
),
|
),
|
||||||
status_result(Health).
|
status_result(Health).
|
||||||
|
|
||||||
status_result(true) -> connected;
|
status_result(true) -> ?status_connected;
|
||||||
status_result(false) -> connecting;
|
status_result(false) -> ?status_disconnected;
|
||||||
status_result({error, _}) -> connecting.
|
status_result({error, _}) -> ?status_disconnected.
|
||||||
|
|
||||||
on_add_channel(
|
on_add_channel(
|
||||||
_InstanceId,
|
_InstanceId,
|
||||||
|
@ -251,7 +251,7 @@ on_get_channels(InstanceId) ->
|
||||||
on_get_channel_status(_InstanceId, ChannelId, #{channels := Channels}) ->
|
on_get_channel_status(_InstanceId, ChannelId, #{channels := Channels}) ->
|
||||||
case maps:is_key(ChannelId, Channels) of
|
case maps:is_key(ChannelId, Channels) of
|
||||||
true ->
|
true ->
|
||||||
connected;
|
?status_connected;
|
||||||
_ ->
|
_ ->
|
||||||
{error, not_exists}
|
{error, not_exists}
|
||||||
end.
|
end.
|
||||||
|
|
|
@ -347,7 +347,7 @@ t_get_status(Config) ->
|
||||||
_Sleep = 500,
|
_Sleep = 500,
|
||||||
_Attempts = 10,
|
_Attempts = 10,
|
||||||
?assertMatch(
|
?assertMatch(
|
||||||
#{status := connecting},
|
#{status := disconnected},
|
||||||
emqx_bridge_v2:health_check(syskeeper_forwarder, ?SYSKEEPER_NAME)
|
emqx_bridge_v2:health_check(syskeeper_forwarder, ?SYSKEEPER_NAME)
|
||||||
)
|
)
|
||||||
).
|
).
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Fixed an issue where the syskeeper forwarder would never reconnect when the connection was lost.
|
Loading…
Reference in New Issue