Skip to content

Commit

Permalink
Avoid shadowing doneCh.
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed Nov 20, 2016
1 parent 13aa3ab commit 0cd90f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api-notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ func (c Client) ListenBucketNotification(bucketName, prefix, suffix string, even

// Continously run and listen on bucket notification.
// Create a done channel to control 'ListObjects' go routine.
doneCh := make(chan struct{}, 1)
retryDoneCh := make(chan struct{}, 1)

// Indicate to our routine to exit cleanly upon return.
defer close(doneCh)
defer close(retryDoneCh)

// Wait on the jitter retry loop.
for range c.newRetryTimerContinous(time.Second, time.Second*30, MaxJitter, doneCh) {
for range c.newRetryTimerContinous(time.Second, time.Second*30, MaxJitter, retryDoneCh) {
urlValues := make(url.Values)
urlValues.Set("prefix", prefix)
urlValues.Set("suffix", suffix)
Expand Down

0 comments on commit 0cd90f4

Please sign in to comment.