diff --git a/transport.go b/transport.go index c7902b3..815384a 100644 --- a/transport.go +++ b/transport.go @@ -186,6 +186,7 @@ func (t *transport) Dial(ctx context.Context, raddr ma.Multiaddr, p peer.ID) (tp connaddrs := &connAddrs{lmAddr: localMultiaddr, rmAddr: remoteMultiaddr} if t.gater != nil && !t.gater.InterceptSecured(n.DirOutbound, p, connaddrs) { + sess.CloseWithError(0, "") pconn.DecreaseCount() return nil, fmt.Errorf("secured connection gated") }