Browse Source

close the scope when the connection gater intercepts

pull/1737/head
Marten Seemann 2 years ago
parent
commit
86a058d848
  1. 1
      p2p/transport/webtransport/transport.go

1
p2p/transport/webtransport/transport.go

@ -143,6 +143,7 @@ func (t *transport) Dial(ctx context.Context, raddr ma.Multiaddr, p peer.ID) (tp
if t.gater != nil && !t.gater.InterceptSecured(network.DirOutbound, p, sconn) {
// TODO: can we close with a specific error here?
sess.Close()
scope.Done()
return nil, fmt.Errorf("secured connection gated")
}

Loading…
Cancel
Save