From c9cd26d6d3615d1adc981eb89aa9fa35d6799c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E6=89=87=E6=BB=91=E7=BF=94=E7=BF=BC?= Date: Fri, 25 Jul 2025 22:40:26 +0800 Subject: [PATCH] UDP: Remove removeRay()'s error log (#4936) From https://github.com/XTLS/Xray-core/pull/4899 --- transport/internet/udp/dispatcher.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/transport/internet/udp/dispatcher.go b/transport/internet/udp/dispatcher.go index b4b9a0d3..22db4244 100644 --- a/transport/internet/udp/dispatcher.go +++ b/transport/internet/udp/dispatcher.go @@ -70,11 +70,10 @@ func (v *Dispatcher) getInboundRay(ctx context.Context, dest net.Destination) (* removeRay := func() { v.Lock() defer v.Unlock() + // sometimes the entry is already removed by others, don't close again if entry == v.conn { cancel() v.removeRay() - } else { - errors.LogError(ctx, "removeRay trying to remove a conn that not belongs to it, canceling.") } } timer := signal.CancelAfterInactivity(ctx, removeRay, time.Minute)