fix(netxlite/quic): close udp conn after failed handshake (#533)
Closes https://github.com/ooni/probe/issues/1794
This commit is contained in:
parent
86018ecb82
commit
762fb27c0b
|
@ -154,6 +154,7 @@ func (d *quicDialerQUICGo) DialContext(ctx context.Context, network string,
|
|||
sess, err := d.dialEarlyContext(
|
||||
ctx, pconn, udpAddr, address, tlsConfig, quicConfig)
|
||||
if err != nil {
|
||||
pconn.Close() // we own it on failure
|
||||
return nil, err
|
||||
}
|
||||
return &quicSessionOwnsConn{EarlySession: sess, conn: pconn}, nil
|
||||
|
|
Loading…
Reference in New Issue
Block a user