diff options
author | Hugo Arès <hugo.ares@ericsson.com> | 2017-04-28 09:42:49 +0200 |
---|---|---|
committer | Hugo Arès <hugo.ares@ericsson.com> | 2017-05-30 07:57:39 -0400 |
commit | 0a713a8b2c8ed2657535803ef044af080493147a (patch) | |
tree | c4cb12d51fd51a60934d2ece36928fb579c294df | |
parent | 033b6ec2b74ac506f6cb02bb25aecc4a51cdfde7 (diff) |
Fix replication retries when maxRetries is set to 0
maxRetries defaults to 0 which means retry indefinitely but it was not
retrying.
Change-Id: I6c8d8d6b1511d67b647f25193dcfe860687eea76
-rw-r--r-- | src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java index 16c8577..46a87a4 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java @@ -204,7 +204,7 @@ class PushOne implements ProjectRunnable, CanceledWhileRunning { boolean setToRetry() { retrying = true; retryCount++; - return retryCount <= maxRetries; + return maxRetries == 0 || retryCount <= maxRetries; } void canceledByReplication() { |