mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-22 12:49:20 +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
|
@ -339,7 +339,7 @@ func (w *udpWorker) clean() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
for addr, conn := range w.activeConn {
|
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)
|
delete(w.activeConn, addr)
|
||||||
conn.Close()
|
conn.Close()
|
||||||
}
|
}
|
||||||
|
@ -361,7 +361,7 @@ func (w *udpWorker) Start() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
w.checker = &task.Periodic{
|
w.checker = &task.Periodic{
|
||||||
Interval: time.Second * 16,
|
Interval: time.Minute,
|
||||||
Execute: w.clean,
|
Execute: w.clean,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue