* fix retry{ ... } logic

This commit is contained in:
Reinhard Pointner 2012-12-02 09:32:33 +00:00
parent f053ecd8be
commit 55b4b26890
1 changed files with 1 additions and 1 deletions

View File

@ -364,7 +364,7 @@ def tryQuietly(c) {
* Retry given closure until it returns successfully (indefinitely by default)
*/
def retry(n = -1, quiet = false, c) {
for(int i = 1; i <= n; i++) {
for(int i = 0; n < 0 || i <= n; i++) {
try {
return c.call()
} catch(Throwable e) {