chore: lazy-start heartbeat

This commit is contained in:
andig 2023-08-08 23:13:45 +02:00
parent 5a1f3c18d9
commit 7a314c79ee

View file

@ -121,7 +121,7 @@ func (wb *Salia) heartbeat() {
bo.InitialInterval = 5 * time.Second
bo.MaxElapsedTime = time.Minute
for ; true; <-time.Tick(30 * time.Second) {
for range time.Tick(30 * time.Second) {
if err := backoff.Retry(func() error {
return wb.post(salia.HeartBeat, "alive")
}, bo); err != nil {