From 43eb5d1b25139a18055e6bfb3039744f363edb74 Mon Sep 17 00:00:00 2001 From: RPRX <63339210+rprx@users.noreply.github.com> Date: Sun, 10 Jan 2021 04:50:26 +0000 Subject: [PATCH] 16 -> 60, 8 -> 300 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/XTLS/Xray-core/issues/129#issuecomment-757355137 十分感谢 @GleenJi 等协助测试 --- app/proxyman/inbound/worker.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/proxyman/inbound/worker.go b/app/proxyman/inbound/worker.go index c42a5b5a..35b4fda0 100644 --- a/app/proxyman/inbound/worker.go +++ b/app/proxyman/inbound/worker.go @@ -339,7 +339,7 @@ func (w *udpWorker) clean() error { } for addr, conn := range w.activeConn { - if nowSec-atomic.LoadInt64(&conn.lastActivityTime) > 8 { // TODO Timeout too small + if nowSec-atomic.LoadInt64(&conn.lastActivityTime) > 300 { delete(w.activeConn, addr) conn.Close() } @@ -361,7 +361,7 @@ func (w *udpWorker) Start() error { } w.checker = &task.Periodic{ - Interval: time.Second * 16, + Interval: time.Minute, Execute: w.clean, }