mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-11-05 18:07:00 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user