aboutsummaryrefslogtreecommitdiff
path: root/p2p/src
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/src')
-rw-r--r--p2p/src/peer_pool.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/p2p/src/peer_pool.rs b/p2p/src/peer_pool.rs
index 0d17307..e2a9de7 100644
--- a/p2p/src/peer_pool.rs
+++ b/p2p/src/peer_pool.rs
@@ -210,10 +210,7 @@ impl PeerPool {
/// Shuts down the peer and remove it from the peer list.
async fn remove_peer(&self, pid: &PeerID) -> Result<()> {
- let mut peers = self.peers.lock().await;
- let result = peers.remove(pid);
-
- drop(peers);
+ let result = self.peers.lock().await.remove(pid);
let peer = match result {
Some(p) => p,