Updated Branches: refs/heads/CURATOR-72 226590541 -> 5238d5f08
added a comment Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/5238d5f0 Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/5238d5f0 Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/5238d5f0 Branch: refs/heads/CURATOR-72 Commit: 5238d5f083f0c5b9c28e4c73d834873737dab936 Parents: 2265905 Author: randgalt <[email protected]> Authored: Mon Feb 3 13:50:25 2014 -0500 Committer: randgalt <[email protected]> Committed: Mon Feb 3 13:50:25 2014 -0500 ---------------------------------------------------------------------- .../org/apache/curator/framework/imps/CuratorFrameworkImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/curator/blob/5238d5f0/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java ---------------------------------------------------------------------- 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 0f98495..7854308 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 @@ -622,7 +622,8 @@ public class CuratorFrameworkImpl implements CuratorFramework public void retriesExhausted(OperationAndData<String> operationAndData) { // if instanceIndex != newInstanceIndex, the ZooKeeper instance was reset/reallocated - // so the pending background sync is no longer valid + // so the pending background sync is no longer valid. + // if instanceIndex is -1, this is the second try to sync - punt and mark the connection lost if ( (instanceIndex < 0) || (instanceIndex == client.getInstanceIndex()) ) { connectionStateManager.addStateChange(ConnectionState.LOST);
