mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-04-05 14:17:36 +03:00
Reduce a local variable (#2363)
This commit is contained in:
parent
b341c21dbd
commit
6d826afac5
1 changed files with 1 additions and 3 deletions
|
@ -280,13 +280,11 @@ func (xTransport *XTransport) rebuildTransport() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
var udpConn *net.UDPConn
|
|
||||||
if xTransport.h3UDPConn == nil {
|
if xTransport.h3UDPConn == nil {
|
||||||
udpConn, err = net.ListenUDP("udp", &net.UDPAddr{IP: net.IPv4zero, Port: 0})
|
xTransport.h3UDPConn, err = net.ListenUDP("udp", &net.UDPAddr{IP: net.IPv4zero, Port: 0})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
xTransport.h3UDPConn = udpConn
|
|
||||||
}
|
}
|
||||||
return quic.DialEarlyContext(ctx, xTransport.h3UDPConn, udpAddr, host, tlsCfg, cfg)
|
return quic.DialEarlyContext(ctx, xTransport.h3UDPConn, udpAddr, host, tlsCfg, cfg)
|
||||||
}}
|
}}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue