chore: lazy-start heartbeat
This commit is contained in:
parent
5a1f3c18d9
commit
7a314c79ee
1 changed files with 1 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue