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 2014/05/23 17:07:20 UTC

[19/29] git commit: Lock is leaving dangling watchers for nodes that don't exist.

Lock is leaving dangling watchers for nodes that don't exist.


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

Branch: refs/heads/CURATOR-105
Commit: 8a94985c07b3e6f74ac1a2935af008cbdb649410
Parents: 351c67c
Author: Dominic Wong <do...@hailocab.com>
Authored: Wed May 21 13:20:55 2014 +0100
Committer: Dominic Wong <do...@hailocab.com>
Committed: Wed May 21 13:20:55 2014 +0100

----------------------------------------------------------------------
 .../apache/curator/framework/recipes/locks/LockInternals.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/8a94985c/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/LockInternals.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/LockInternals.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/LockInternals.java
index 06a1f6b..4b0d085 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/LockInternals.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/locks/LockInternals.java
@@ -295,8 +295,8 @@ public class LockInternals
 
                     synchronized(this)
                     {
-                        Stat stat = client.checkExists().usingWatcher(watcher).forPath(previousSequencePath);
-                        if ( stat != null )
+                        byte[] data = client.getData().usingWatcher(watcher).forPath(previousSequencePath);
+                        if ( data != null )
                         {
                             if ( millisToWait != null )
                             {