Skip to content

Commit

Permalink
fix incorrect condition
Browse files Browse the repository at this point in the history
  • Loading branch information
drHuangMHT committed Jan 23, 2025
1 parent efa83b1 commit 47b81c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions misc/connection-limits/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ impl NetworkBehaviour for Behaviour {
local_addr: &Multiaddr,
remote_addr: &Multiaddr,
) -> Result<(), ConnectionDenied> {
if !self
if self
.bypass_rules
.is_bypassed(None, std::slice::from_ref(remote_addr), Some(local_addr))
{
Expand Down Expand Up @@ -355,7 +355,7 @@ impl NetworkBehaviour for Behaviour {
addresses: &[Multiaddr],
_: Endpoint,
) -> Result<Vec<Multiaddr>, ConnectionDenied> {
if !self
if self
.bypass_rules
.is_bypassed(maybe_peer.as_ref(), addresses, None)
{
Expand All @@ -382,7 +382,7 @@ impl NetworkBehaviour for Behaviour {
_: PortUse,
) -> Result<THandler<Self>, ConnectionDenied> {
self.pending_outbound_connections.remove(&connection_id);
if !self
if self
.bypass_rules
.is_bypassed(Some(&peer), std::slice::from_ref(addr), None)
{
Expand Down

0 comments on commit 47b81c3

Please sign in to comment.