diff --git a/apps/iot/src/iot_endpoint.erl b/apps/iot/src/iot_endpoint.erl index 8b0bf56..385d9df 100644 --- a/apps/iot/src/iot_endpoint.erl +++ b/apps/iot/src/iot_endpoint.erl @@ -180,8 +180,8 @@ handle_event(info, fetch_next, connected, State = #state{tab_name = TabName, cur %% 收到确认消息 handle_event(info, {ack, Id}, StateName, State = #state{tab_name = TabName, endpoint = #endpoint{name = Name}, timer_map = TimerMap, acc_num = AccNum, flight_num = FlightNum}) -> - lager:debug("[iot_endpoint] endpoint: ~p, get ack: ~p", [Name, Id]), - mnesia_queue:delete(TabName, Id), + ok = mnesia_queue:delete(TabName, Id), + lager:debug("[iot_endpoint] endpoint: ~p, get ack: ~p, delete from mnesia", [Name, Id]), Actions = case StateName =:= connected of true -> [{next_event, info, fetch_next}]; false -> []