From 3ad58b8750377fb68e7cf0f1c43887f97f54aa00 Mon Sep 17 00:00:00 2001 From: RPRX <63339210+RPRX@users.noreply.github.com> Date: Thu, 28 May 2026 14:03:37 +0000 Subject: [PATCH] timer --- proxy/socks/temp_udp_listen.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proxy/socks/temp_udp_listen.go b/proxy/socks/temp_udp_listen.go index 06474d95..5e0dab03 100644 --- a/proxy/socks/temp_udp_listen.go +++ b/proxy/socks/temp_udp_listen.go @@ -28,7 +28,6 @@ type TempUDPConn struct { } func (c *TempUDPConn) Read(b []byte) (n int, err error) { - c.Timer.Update() var remote net.Addr for { n, remote, err = c.PacketConn.ReadFrom(b) @@ -39,10 +38,12 @@ func (c *TempUDPConn) Read(b []byte) (n int, err error) { expected := c.ExpectedRemote.Load() if remote.IP.Equal(expected.IP) { if remote.Port == expected.Port { + c.Timer.Update() return } if expected.Port == 0 { c.ExpectedRemote.Store(remote) + c.Timer.Update() return } }