Skip to content

Commit

Permalink
fix(netxlite/quic): close udp conn after failed handshake (#533)
Browse files Browse the repository at this point in the history
Closes ooni/probe#1794

Backport from master; see ooni/probe#1839.
  • Loading branch information
bassosimone committed Oct 20, 2021
1 parent a548889 commit 5ddd432
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/netxlite/quic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5ddd432

Please sign in to comment.