This commit is contained in:
anlicheng 2023-06-15 17:49:00 +08:00
parent e42584a9b9
commit 881dc36e62

View File

@ -253,14 +253,14 @@ handle_info({timeout, _, ping_ticker}, State = #state{uuid = UUID, is_answered =
case NextStatus of
keep_status ->
{noreply, State};
{noreply, State#state{is_answered = false}};
{next_status, NStatus} ->
case host_bo:change_status(UUID, NStatus) of
{ok, _} ->
{noreply, State#state{status = NStatus}};
{noreply, State#state{status = NStatus, is_answered = false}};
{error, Reason} ->
lager:warning("[iot_host] change host status of uuid: ~p, error: ~p", [UUID, Reason]),
{noreply, State}
{noreply, State#state{is_answered = false}}
end
end;