Skip to content

Commit

Permalink
Fix #213
Browse files Browse the repository at this point in the history
* Added defer statement to Updater.Update to revert u.updating value back to 0 after updating.
  • Loading branch information
志宇 committed Mar 9, 2020
1 parent 9a8708b commit 5a0d224
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/util/updater/updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func (u *Updater) Update() (err error) {
if !atomic.CompareAndSwapUint32(&u.updating, 0, 1) {
return ErrAlreadyStarted
}
defer atomic.StoreUint32(&u.updating, 0)

u.log.Infof("Looking for updates")

Expand Down

0 comments on commit 5a0d224

Please sign in to comment.