mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-22 19:33:32 +02:00
16 -> 60, 8 -> 300
https://github.com/XTLS/Xray-core/issues/129#issuecomment-757355137 十分感谢 @GleenJi 等协助测试
This commit is contained in:
parent
700966508f
commit
43eb5d1b25
1 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue