diff --git a/connection/quic.go b/connection/quic.go index 645daf31..182cb881 100644 --- a/connection/quic.go +++ b/connection/quic.go @@ -81,6 +81,8 @@ func NewQUICConnection( session, err := quic.Dial(udpConn, edgeAddr, edgeAddr.String(), tlsConfig, quicConfig) if err != nil { + // close the udp server socket in case of error connecting to the edge + udpConn.Close() return nil, &EdgeQuicDialError{Cause: err} }