Merge remote-tracking branch 'tun/with-tun' into Alpha

This commit is contained in:
Meta
2022-03-28 10:51:59 +08:00
24 changed files with 241 additions and 180 deletions

View File

@ -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: