Merge branch 'stable-2.14'

* stable-2.14:
  Fix replication retries when maxRetries is set to 0

Change-Id: I3d2986f1707bf1b60675ea28fe3dbcc8dfb04681
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 03db941..e472954 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
@@ -208,7 +208,7 @@
   boolean setToRetry() {
     retrying = true;
     retryCount++;
-    return retryCount <= maxRetries;
+    return maxRetries == 0 || retryCount <= maxRetries;
   }
 
   void canceledByReplication() {