Skip to content

Commit af6c4f8

Browse files
committed
Correctly fix #2973
1 parent c9cdee1 commit af6c4f8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

dnscrypt-proxy/xtransport.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,10 @@ func (xTransport *XTransport) rebuildTransport() {
321321
tlsCfg.ServerName = host
322322
conn, err := quic.DialEarly(ctx, udpConn, udpAddr, tlsCfg, cfg)
323323
if err != nil {
324-
conn.Close()
324+
udpConn.Close()
325325
return nil, err
326326
}
327-
return conn, err
327+
return conn, nil
328328
}
329329
h3Transport := &http3.Transport{DisableCompression: true, TLSClientConfig: &tlsClientConfig, Dial: dial}
330330
xTransport.h3Transport = h3Transport

0 commit comments

Comments
 (0)