Skip to content

Commit 534f17f

Browse files
committed
fix: Close function was empty
1 parent c66d628 commit 534f17f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

s3.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type S3Configuration struct {
2626
type S3Watcher struct {
2727
WatcherBase
2828

29-
synching uint32
29+
syncing uint32
3030

3131
ticker *time.Ticker
3232
stop chan bool
@@ -86,6 +86,7 @@ func (u *S3Watcher) Start() {
8686
}
8787

8888
func (u *S3Watcher) Close() {
89+
u.stop <- true
8990
}
9091

9192
func (u *S3Watcher) getCachedObject(o *S3Object) *S3Object {
@@ -115,10 +116,10 @@ func (u *S3Object) AreTagsChanged(new *S3Object) bool {
115116

116117
func (u *S3Watcher) sync() {
117118
// allow only one sync at same time
118-
if !atomic.CompareAndSwapUint32(&u.synching, 0, 1) {
119+
if !atomic.CompareAndSwapUint32(&u.syncing, 0, 1) {
119120
return
120121
}
121-
defer atomic.StoreUint32(&u.synching, 0)
122+
defer atomic.StoreUint32(&u.syncing, 0)
122123

123124
// Avoid to delete all the things if the updater env is not ready...
124125
if u.isConnected() == false {

0 commit comments

Comments
 (0)