Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-berg committed Feb 25, 2022
1 parent 89fded3 commit b3881bf
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ class SdkObservableInstrument<O>

@Override
public void close() {
if (removed.compareAndSet(false, true)) {
storages.forEach(storage -> storage.removeCallback(callback));
if (!removed.compareAndSet(false, true)) {
throttlingLogger.log(
Level.WARNING, "Instrument " + instrumentName + " has called close() multiple times.");
return;
}
throttlingLogger.log(
Level.WARNING, "Instrument " + instrumentName + " has called close() multiple times.");
storages.forEach(storage -> storage.removeCallback(callback));
}
}

0 comments on commit b3881bf

Please sign in to comment.