From 881dc36e626e25ecd4c1ffb37cfd72479fa56fd5 Mon Sep 17 00:00:00 2001 From: anlicheng Date: Thu, 15 Jun 2023 17:49:00 +0800 Subject: [PATCH] fix ping --- apps/iot/src/iot_host.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/iot/src/iot_host.erl b/apps/iot/src/iot_host.erl index 200a2dd..ad58207 100644 --- a/apps/iot/src/iot_host.erl +++ b/apps/iot/src/iot_host.erl @@ -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;