Skip to content

Commit 64f15d9

Browse files
committed
TUN-6981: We should close UDP socket if failed to connecto to edge
1 parent e3d3557 commit 64f15d9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

connection/quic.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ func NewQUICConnection(
8181

8282
session, err := quic.Dial(udpConn, edgeAddr, edgeAddr.String(), tlsConfig, quicConfig)
8383
if err != nil {
84+
// close the udp server socket in case of error connecting to the edge
85+
udpConn.Close()
8486
return nil, &EdgeQuicDialError{Cause: err}
8587
}
8688

0 commit comments

Comments
 (0)