From 0cd90f4c44c5e86f4cf8faf865ae5388df2843fb Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sun, 20 Nov 2016 14:51:24 -0800 Subject: [PATCH] Avoid shadowing doneCh. --- api-notification.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api-notification.go b/api-notification.go index 347b160ee..15ac779e1 100644 --- a/api-notification.go +++ b/api-notification.go @@ -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)