aboutsummaryrefslogtreecommitdiff
path: root/p2p/src/discovery/refresh.rs
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/src/discovery/refresh.rs')
-rw-r--r--p2p/src/discovery/refresh.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/p2p/src/discovery/refresh.rs b/p2p/src/discovery/refresh.rs
index a708261..1ced266 100644
--- a/p2p/src/discovery/refresh.rs
+++ b/p2p/src/discovery/refresh.rs
@@ -130,14 +130,12 @@ impl RefreshService {
.notify(&DiscoveryEvent::RefreshStarted.into())
.await;
- let table = self.table.lock().await;
let mut entries: Vec<BucketEntry> = vec![];
- for bucket in table.iter() {
+ for bucket in self.table.lock().await.iter() {
for entry in bucket.random_iter(8) {
entries.push(entry.clone())
}
}
- drop(table);
self.clone().do_refresh(&entries).await;
}