Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
Retry more times (to overcome Gatekeeper issue)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel committed Apr 12, 2016
1 parent 314b049 commit 3b2b6b7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions updater_osx.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,13 @@ func (u *Updater) openApplication(applicationPath string) error {
}
return nil
}
if err := tryOpen(); err != nil {
u.log.Errorf("Open error (trying again in a few seconds): %s", err)
time.Sleep(3 * time.Second)
return tryOpen()
for i := 0; i < 10; i++ {
err := tryOpen()
if err == nil {
break
}
u.log.Errorf("Open error (trying again in a second): %s", err)
time.Sleep(1 * time.Second)
}
return nil
}
Expand Down

0 comments on commit 3b2b6b7

Please sign in to comment.