Skip to content

Commit 770d447

Browse files
authored
Fix sleep for first retry attempt
* Bug introduced in: b499ca7
1 parent d35d429 commit 770d447

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exporter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func createClientWithRetries(getClient func() (interface{}, error), retries uint
102102
if err == nil {
103103
return nginxClient, nil
104104
}
105-
if i > 0 {
105+
if i < int(retries) {
106106
log.Printf("Could not create Nginx Client. Retrying in %v...", retryInterval)
107107
time.Sleep(retryInterval)
108108
}

0 commit comments

Comments
 (0)