1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-04 08:15:21 -05:00

add custom probe interval for observer

This commit is contained in:
Shelikhoo
2021-06-30 19:33:37 +01:00
parent 4773e3a1ed
commit 54fc21e537
6 changed files with 97 additions and 14 deletions

View File

@@ -76,7 +76,11 @@ func (o *Observer) background() {
if o.finished.Done() {
return
}
time.Sleep(time.Second * 10)
sleepTime := time.Second * 10
if o.config.ProbeInterval != 0 {
sleepTime = time.Duration(o.config.ProbeInterval)
}
time.Sleep(sleepTime)
}
}
}