mirror of
https://github.com/serai-dex/serai.git
synced 2024-12-22 19:49:22 +00:00
Replace expect with debug log
This commit is contained in:
parent
e01848aa9e
commit
fddbebc7c0
1 changed files with 4 additions and 4 deletions
|
@ -541,10 +541,10 @@ impl LibP2p {
|
||||||
}
|
}
|
||||||
Some(SwarmEvent::ConnectionClosed { peer_id, endpoint, .. }) => {
|
Some(SwarmEvent::ConnectionClosed { peer_id, endpoint, .. }) => {
|
||||||
let mut connected_peers = connected_peers.write().await;
|
let mut connected_peers = connected_peers.write().await;
|
||||||
let nets =
|
let Some(nets) = connected_peers.remove(endpoint.get_remote_address()) else {
|
||||||
connected_peers
|
log::debug!("closed connection to peer which wasn't in connected_peers");
|
||||||
.remove(endpoint.get_remote_address())
|
continue;
|
||||||
.expect("closed connection to peer which never connected");
|
};
|
||||||
// Downgrade to a read lock
|
// Downgrade to a read lock
|
||||||
let connected_peers = connected_peers.downgrade();
|
let connected_peers = connected_peers.downgrade();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue