Skip to content

Commit

Permalink
address yet another lovely race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
divagant-martian committed Nov 25, 2021
1 parent 1c1ab66 commit b43a169
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions swarm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -615,9 +615,7 @@ where
Poll::Ready(NetworkEvent::ConnectionEvent { connection, event }) => {
let peer = connection.peer_id();
let conn_id = connection.id();
if this.banned_peer_connections.contains(&conn_id)
|| this.banned_peers.contains(&peer)
{
if this.banned_peer_connections.contains(&conn_id) {
log::debug!("Ignoring event from banned peer: {} {:?}.", peer, conn_id);
} else {
this.behaviour.inject_event(peer, conn_id, event);
Expand Down

0 comments on commit b43a169

Please sign in to comment.