From 91f312bc2977c3b22fbc386969852a26de9d6c59 Mon Sep 17 00:00:00 2001 From: patterniha <71074308+patterniha@users.noreply.github.com> Date: Tue, 15 Jul 2025 06:20:43 +0330 Subject: [PATCH] Update dispatcher.go --- transport/internet/udp/dispatcher.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/transport/internet/udp/dispatcher.go b/transport/internet/udp/dispatcher.go index 1dea6de7..998b77f4 100644 --- a/transport/internet/udp/dispatcher.go +++ b/transport/internet/udp/dispatcher.go @@ -85,6 +85,7 @@ func (v *Dispatcher) getInboundRay(ctx context.Context, dest net.Destination) (* link: link, cancel: cancel, } + entry.cancel() //entryClose := func() { // entry.Close() //} @@ -108,7 +109,7 @@ func (v *Dispatcher) Dispatch(ctx context.Context, destination net.Destination, if outputStream != nil { if err := outputStream.WriteMultiBuffer(buf.MultiBuffer{payload}); err != nil { errors.LogInfoInner(ctx, err, "failed to write first UDP payload") - conn.Close() + // conn.Close() return } } @@ -116,7 +117,7 @@ func (v *Dispatcher) Dispatch(ctx context.Context, destination net.Destination, func handleInput(ctx context.Context, conn *connEntry, dest net.Destination, callback ResponseCallback, callClose func() error) { defer func() { - conn.Close() + // conn.Close() if callClose != nil { callClose() }