mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-10-20 22:50:53 +00:00
Burst observatory: Fix init check (#6221)
https://github.com/XTLS/Xray-core/pull/6106#issuecomment-4587975865
This commit is contained in:
parent
cb8cd048c1
commit
c4dfcd4c1a
1 changed files with 10 additions and 0 deletions
|
|
@ -96,6 +96,16 @@ func (h *HealthPing) StartScheduler(selector func() ([]string, error)) {
|
|||
ticker := time.NewTicker(interval)
|
||||
h.ticker = ticker
|
||||
|
||||
// init run to get a fast check result
|
||||
go func() {
|
||||
tags, err := selector()
|
||||
if err != nil {
|
||||
errors.LogWarning(h.ctx, "error select outbounds for initial health check: ", err)
|
||||
return
|
||||
}
|
||||
h.Check(tags)
|
||||
}()
|
||||
|
||||
go func() {
|
||||
for {
|
||||
go func() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue