Skip to content

Commit

Permalink
Fix retry resets
Browse files Browse the repository at this point in the history
  • Loading branch information
jveski committed Aug 14, 2023
1 parent 030d803 commit c80bfe0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions sync/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,13 @@ func (c *Controller) Run(ctx context.Context) {
changed, err := c.sync(ctx)
if err != nil {
log.Printf("sync error: %s", err)
}

if !changed && err == nil {
} else {
lastRetry = 0
time.Sleep(time.Second * 5) // cooldown
continue

if !changed {
time.Sleep(time.Second * 5) // cooldown
continue
}
}

if lastRetry == 0 {
Expand Down

0 comments on commit c80bfe0

Please sign in to comment.