hotfix: fix ping bug (#213)

Co-authored-by: wencaiwulue <895703375@qq.com>
This commit is contained in:
naison
2024-04-06 13:16:13 +08:00
committed by GitHub
parent 4eeecd5255
commit 45491f185d
5 changed files with 14 additions and 11 deletions

View File

@@ -142,7 +142,7 @@ func Heartbeats() {
for ; true; <-ticker.C {
for _, ip := range []net.IP{config.RouterIP, config.RouterIP6} {
time.Sleep(time.Millisecond * time.Duration(rand.Intn(1000)))
_, _ = Ping(ip.String())
_, _ = Ping(context.Background(), ip.String())
}
}
}