Skip to content

Commit

Permalink
fix(DistributedQuery): if already visited, ignore the peer
Browse files Browse the repository at this point in the history
  • Loading branch information
richardschneider committed Sep 2, 2019
1 parent 33849f6 commit 9d849b0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Routing/DistributedQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,11 @@ async Task AskAsync(int taskId)
continue;
}

if (!visited.TryAdd(peer, peer))
{
continue;
}
++pass;
visited.TryAdd(peer, peer);

// Ask the nearest peer.
await askCount.WaitAsync(runningQuery.Token).ConfigureAwait(false);
Expand Down

0 comments on commit 9d849b0

Please sign in to comment.