Oops, a zero retry_interval check had gone missing in scheduling reorganisation.

Mon, 05 Feb 2018 18:24:30 +0000

author
Tuomo Valkonen <tuomov@iki.fi>
date
Mon, 05 Feb 2018 18:24:30 +0000
changeset 107
f63835e9f29e
parent 106
a7bdc239ef62
child 108
6409aa77ddd5

Oops, a zero retry_interval check had gone missing in scheduling reorganisation.

borgend/backup.py file | annotate | diff | comparison | revisions
--- a/borgend/backup.py	Mon Feb 05 10:25:17 2018 +0000
+++ b/borgend/backup.py	Mon Feb 05 18:24:30 2018 +0000
@@ -672,8 +672,8 @@
             prev=self.previous_operation_of_type[Operation.LIST]
             if prev.ok():
                 return None
-            if self.retry_interval==0:
-                # Do not retry in case of errors if retry interval is zero
+            if self.retry_interval<=0:
+                # Do not retry in case of errors if retry interval is <= 0
                 return None
             # Attempt after retry interval
             tm=MonotonicTime.after_other(prev.finish_time, self.retry_interval)
@@ -707,6 +707,9 @@
             # standard interval.
             prev=self.previous_operation_of_type[optype]
             if not prev.ok():
+                # Do not retry in case of errors if retry interval is <= 0
+                if self.retry_interval<=0:
+                    return None
                 tm=MonotonicTime.after_other(prev.start_time,
                                              self.retry_interval)
                 return Operation(optype, tm, reason='retry')

mercurial