diff --git a/apps/iot/src/endpoint/endpoint_http.erl b/apps/iot/src/endpoint/endpoint_http.erl index fe9a8b6..bf9615c 100644 --- a/apps/iot/src/endpoint/endpoint_http.erl +++ b/apps/iot/src/endpoint/endpoint_http.erl @@ -99,7 +99,8 @@ handle_info({next_data, Id, Metric}, State = #state{buffer = Buffer, endpoint = {ok, RespBody} = hackney:body(ClientRef), hackney:close(ClientRef), lager:debug("[endpoint_http] url: ~p, http_code: ~p, response is: ~p", [Url, HttpCode, RespBody]), - {noreply, State}; + NBuffer = endpoint_buffer:ack(Id, Buffer), + {noreply, State#state{buffer = NBuffer}}; {error, Reason} -> lager:warning("[endpoint_http] url: ~p, get error: ~p", [Url, Reason]), {noreply, State}