mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +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