On error when fetching stats, ignore and return whatever you have so far.

This commit is contained in:
Gregory Burd 2013-04-19 16:44:51 -04:00
parent 17cfdcd04f
commit be95229af9

View file

@ -545,6 +545,8 @@ from_index_key(LKey) ->
%% Return all status from wterl statistics cursor
fetch_status(Cursor) ->
{ok, fetch_status(Cursor, wterl:cursor_next_value(Cursor), [])}.
fetch_status(_Cursor, {error, _}, Acc) ->
lists:reverse(Acc);
fetch_status(_Cursor, not_found, Acc) ->
lists:reverse(Acc);
fetch_status(Cursor, {ok, Stat}, Acc) ->