Skip to content

Commit

Permalink
Merge pull request #103 from Feuerlabs/uw-get_cached_value-bug
Browse files Browse the repository at this point in the history
Datapoint inconsistencies can make exometer:get_values/1 crash
  • Loading branch information
uwiger committed Dec 14, 2017
2 parents c4afd6d + 2688f5c commit 588da23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/exometer.erl
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,8 @@ get_cached_value_(#exometer_entry{name = Name,
[ exometer_cache:write(Name, DataPoint1, Value1, CacheTTL)
|| { DataPoint1, Value1 } <- Result],
All = Result ++ Cached,
[{_,_} = lists:keyfind(DP, 1, All) || DP <- DataPoints]
[{_,_} = lists:keyfind(DP, 1, All) || DP <- DataPoints,
lists:keymember(DP,1,All)]
end.


Expand Down

0 comments on commit 588da23

Please sign in to comment.