Skip to content

Commit

Permalink
Fix another potential race condition in MockReporter
Browse files Browse the repository at this point in the history
  • Loading branch information
felixbarny committed May 12, 2020
1 parent d08e731 commit e08aad2
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,12 @@ public synchronized void decrementReferences() {
*/
public synchronized void assertRecycledAfterDecrementingReferences() {

List<Transaction> transactions = getTransactions();
List<Transaction> transactionsToFlush = transactions.stream()
.filter(t -> !hasEmptyTraceContext(t))
.collect(Collectors.toList());

List<Span> spans = getSpans();
List<Span> spansToFlush = spans.stream()
.filter(s-> !hasEmptyTraceContext(s))
.collect(Collectors.toList());
Expand Down

0 comments on commit e08aad2

Please sign in to comment.