mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-23 16:28:51 -05:00
* fix retry{ ... } logic
This commit is contained in:
parent
f053ecd8be
commit
55b4b26890
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user