|
@@ -123,8 +123,8 @@ public class ThrottledAsyncChecker<K, V> implements AsyncChecker<K, V> {
|
|
return Optional.empty();
|
|
return Optional.empty();
|
|
}
|
|
}
|
|
|
|
|
|
- if (completedChecks.containsKey(target)) {
|
|
|
|
- final LastCheckResult<V> result = completedChecks.get(target);
|
|
|
|
|
|
+ final LastCheckResult<V> result = completedChecks.get(target);
|
|
|
|
+ if (result != null) {
|
|
final long msSinceLastCheck = timer.monotonicNow() - result.completedAt;
|
|
final long msSinceLastCheck = timer.monotonicNow() - result.completedAt;
|
|
if (msSinceLastCheck < minMsBetweenChecks) {
|
|
if (msSinceLastCheck < minMsBetweenChecks) {
|
|
LOG.debug("Skipped checking {}. Time since last check {}ms " +
|
|
LOG.debug("Skipped checking {}. Time since last check {}ms " +
|