UdpHop finalmask: Avoid spurious error logs on closed hop sockets (#7319)

https://github.com/XTLS/Xray-core/pull/7319#issuecomment-6628950766
This commit is contained in:
Miny
2026-11-04 11:01:44 +00:00
committed by GitHub
parent fff4acac52
commit 858c44f410
+2 -1
View File
@@ -6,6 +6,7 @@ import (
goerrors "errors"
"io"
mrand "math/rand"
stdnet "net"
"net/netip"
"sync"
"time"
@@ -164,7 +165,7 @@ func (c *udpHopConn) recv(conn net.PacketConn) {
n, addr, err := conn.ReadFrom(p)
if err != nil {
pool.Put(p[:cap(p)])
if c.closed() {
if c.closed() || goerrors.Is(err, stdnet.ErrClosed) {
return
}
var netErr net.Error