Ver Fonte

16 -> 60, 8 -> 300

https://github.com/XTLS/Xray-core/issues/129#issuecomment-757355137

十分感谢 @GleenJi 等协助测试
RPRX há 4 anos atrás
pai
commit
43eb5d1b25
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      app/proxyman/inbound/worker.go

+ 2 - 2
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,
 	}