curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randg...@apache.org
Subject [1/2] curator git commit: CURATOR-284 - must check result code before processing background event
Date Wed, 06 Jan 2016 20:52:59 GMT
Repository: curator
Updated Branches:
  refs/heads/CURATOR-3.0 2d0d2b122 -> 5c34cb10b


CURATOR-284 - must check result code before processing background event


Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/0ae29502
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/0ae29502
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/0ae29502

Branch: refs/heads/CURATOR-3.0
Commit: 0ae295025d4a5c59c6021d1dfd3b44a40e72ec88
Parents: 5981418
Author: randgalt <randgalt@apache.org>
Authored: Wed Jan 6 12:52:44 2016 -0800
Committer: randgalt <randgalt@apache.org>
Committed: Wed Jan 6 12:52:44 2016 -0800

----------------------------------------------------------------------
 .../java/org/apache/curator/framework/imps/EnsembleTracker.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/0ae29502/curator-framework/src/main/java/org/apache/curator/framework/imps/EnsembleTracker.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/EnsembleTracker.java
b/curator-framework/src/main/java/org/apache/curator/framework/imps/EnsembleTracker.java
index 7dc1336..bc59512 100644
--- a/curator-framework/src/main/java/org/apache/curator/framework/imps/EnsembleTracker.java
+++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/EnsembleTracker.java
@@ -31,6 +31,7 @@ import org.apache.curator.framework.api.CuratorEventType;
 import org.apache.curator.framework.api.CuratorWatcher;
 import org.apache.curator.framework.state.ConnectionState;
 import org.apache.curator.framework.state.ConnectionStateListener;
+import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.WatchedEvent;
 import org.apache.zookeeper.Watcher;
 import org.apache.zookeeper.server.quorum.QuorumPeer;
@@ -129,7 +130,7 @@ public class EnsembleTracker implements Closeable, CuratorWatcher
                 @Override
                 public void processResult(CuratorFramework client, CuratorEvent event) throws
Exception
                 {
-                    if ( event.getType() == CuratorEventType.GET_CONFIG )
+                    if ( (event.getType() == CuratorEventType.GET_CONFIG) && (event.getResultCode()
== KeeperException.Code.OK.intValue()) )
                     {
                         processConfigData(event.getData());
                     }


Mime
View raw message