mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 00:53:15 +08:00
Chore: adjust HealthCheck at first check
This commit is contained in:
parent
4502776513
commit
7e2c6e5188
@ -31,7 +31,13 @@ type HealthCheck struct {
|
||||
func (hc *HealthCheck) process() {
|
||||
ticker := time.NewTicker(time.Duration(hc.interval) * time.Second)
|
||||
|
||||
go hc.check()
|
||||
go func() {
|
||||
t := time.NewTicker(30 * time.Second)
|
||||
<-t.C
|
||||
t.Stop()
|
||||
hc.check()
|
||||
}()
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-ticker.C:
|
||||
|
Loading…
Reference in New Issue
Block a user