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;