Skip to content

Commit

Permalink
Update node/src/peer_tracker.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Maciej Zwoliński <[email protected]>
  • Loading branch information
oblique and zvolin authored Sep 15, 2023
1 parent 1352ef7 commit 74415b6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions node/src/peer_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ impl PeerTracker {
.iter()
.take(limit)
.map(|v| v.key().to_owned())
// collect instead of returning an iter to not block the dashmap
.collect::<Vec<_>>();

if peers.is_empty() {
Expand Down

0 comments on commit 74415b6

Please sign in to comment.