From f3dbcbd1796507952c9134c2cb2dc5af7b72aede Mon Sep 17 00:00:00 2001 From: patterniha <71074308+patterniha@users.noreply.github.com> Date: Tue, 15 Jul 2025 05:52:17 +0330 Subject: [PATCH] Update worker.go --- app/proxyman/inbound/worker.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/proxyman/inbound/worker.go b/app/proxyman/inbound/worker.go index 46902e81..12e29876 100644 --- a/app/proxyman/inbound/worker.go +++ b/app/proxyman/inbound/worker.go @@ -161,7 +161,6 @@ type udpConn struct { uplink stats.Counter downlink stats.Counter inactive bool - cancel context.CancelFunc } func (c *udpConn) setInactive() { @@ -204,9 +203,6 @@ func (c *udpConn) Write(buf []byte) (int, error) { } func (c *udpConn) Close() error { - if c.cancel != nil { - c.cancel() - } common.Must(c.done.Close()) common.Must(common.Close(c.writer)) return nil @@ -310,8 +306,7 @@ func (w *udpWorker) callback(b *buf.Buffer, source net.Destination, originalDest common.Must(w.checker.Start()) go func() { - ctx, cancel := context.WithCancel(w.ctx) - conn.cancel = cancel + ctx := w.ctx sid := session.NewID() ctx = c.ContextWithID(ctx, sid)