You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ra...@apache.org on 2020/05/08 13:01:03 UTC

[curator] branch master updated: CURATOR-544 - Fix issue with 'error code' 0 being passed to the KeeperExeception create method. This was breaking a lot of code

This is an automated email from the ASF dual-hosted git repository.

randgalt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/curator.git


The following commit(s) were added to refs/heads/master by this push:
     new 5d56951  CURATOR-544 - Fix issue with 'error code' 0 being passed to the KeeperExeception create method. This was breaking a lot of code
5d56951 is described below

commit 5d569518ea617f30296fd3ca983034940a26529d
Author: randgalt <ra...@apache.org>
AuthorDate: Fri May 8 08:00:41 2020 -0500

    CURATOR-544 - Fix issue with 'error code' 0 being passed to the KeeperExeception create method. This was breaking a lot of code
---
 .../java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java
index d80c20b..218175a 100644
--- a/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java
+++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java
@@ -637,7 +637,8 @@ public class CuratorFrameworkImpl implements CuratorFramework
         boolean doQueueOperation = false;
         do
         {
-            if ( getZookeeperClient().getRetryPolicy().allowRetry(KeeperException.create(event.getResultCode())) )
+            KeeperException.Code code = KeeperException.Code.get(event.getResultCode());
+            if ( (code != KeeperException.Code.OK) && getZookeeperClient().getRetryPolicy().allowRetry(KeeperException.create(code)) )
             {
                 doQueueOperation = checkBackgroundRetry(operationAndData, event);
                 break;