From: Siraaj Khandkar Date: Sun, 27 Sep 2015 23:28:00 +0000 (-0400) Subject: Fix request of next ETS key after deletion of previous X-Git-Tag: 0.15.0^2~2 X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=9b2aef839d462e7cca81bacab0bcd624365d86a5;p=beam_stats.git Fix request of next ETS key after deletion of previous --- diff --git a/src/beam_stats_delta.erl b/src/beam_stats_delta.erl index 8820d71..1e3bdfb 100644 --- a/src/beam_stats_delta.erl +++ b/src/beam_stats_delta.erl @@ -61,11 +61,12 @@ gc(?T{erlang_process_info_reductions=Table}=T) -> -spec gc(t(), pid()) -> {}. gc(?T{erlang_process_info_reductions=Table}=T, Pid) -> + Next = ets:next(Table, Pid), case beam_stats_source:erlang_is_process_alive(Pid) of true -> true ; false -> ets:delete(Table, Pid) end, - case ets:next(Table, Pid) + case Next of '$end_of_table' -> {} ; NextPid when is_pid(NextPid) ->