fix: when connecting health check failed, update status.
This commit is contained in:
parent
bd51edf989
commit
1a1c82932a
|
@ -374,7 +374,7 @@ connecting_health_check(Data) ->
|
||||||
{next_state, connected, UpdatedData};
|
{next_state, connected, UpdatedData};
|
||||||
ConnectStatus ->
|
ConnectStatus ->
|
||||||
logger:error("health check for ~p failed: ~p", [Data#data.id, ConnectStatus]),
|
logger:error("health check for ~p failed: ~p", [Data#data.id, ConnectStatus]),
|
||||||
UpdatedData = Data#data{error = ConnectStatus},
|
UpdatedData = Data#data{status = connecting, error = ConnectStatus},
|
||||||
Actions = [{state_timeout, ?SHORT_HEALTHCHECK_INTERVAL, health_check}],
|
Actions = [{state_timeout, ?SHORT_HEALTHCHECK_INTERVAL, health_check}],
|
||||||
{keep_state, UpdatedData, Actions}
|
{keep_state, UpdatedData, Actions}
|
||||||
end.
|
end.
|
||||||
|
|
Loading…
Reference in New Issue