TUN-6981: We should close UDP socket if failed to connecto to edge
This commit is contained in:
parent
e3d35570e6
commit
64f15d9992
|
@ -81,6 +81,8 @@ func NewQUICConnection(
|
||||||
|
|
||||||
session, err := quic.Dial(udpConn, edgeAddr, edgeAddr.String(), tlsConfig, quicConfig)
|
session, err := quic.Dial(udpConn, edgeAddr, edgeAddr.String(), tlsConfig, quicConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
// close the udp server socket in case of error connecting to the edge
|
||||||
|
udpConn.Close()
|
||||||
return nil, &EdgeQuicDialError{Cause: err}
|
return nil, &EdgeQuicDialError{Cause: err}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue