diff --git a/p2p/transport/webrtcprivate/listener.go b/p2p/transport/webrtcprivate/listener.go index 133e53fd73..f356746d85 100644 --- a/p2p/transport/webrtcprivate/listener.go +++ b/p2p/transport/webrtcprivate/listener.go @@ -120,7 +120,7 @@ func (l *listener) handleSignalingStream(s network.Stream) { return } - if l.transport.gater != nil && l.transport.gater.InterceptSecured(network.DirInbound, s.Conn().RemotePeer(), conn) { + if l.transport.gater != nil && !l.transport.gater.InterceptSecured(network.DirInbound, s.Conn().RemotePeer(), conn) { conn.Close() log.Debugf("conn gater refused connection to addr: %s", conn.RemoteMultiaddr()) }