You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ca...@apache.org on 2016/06/01 00:06:41 UTC

[3/5] curator git commit: if the background call happens after closure, remove any watchers

if the background call happens after closure, remove any watchers


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

Branch: refs/heads/CURATOR-3.0
Commit: 4fb089575480befa51174d611d141f4d4fb03fff
Parents: c7f3b00
Author: randgalt <ra...@apache.org>
Authored: Mon May 30 21:13:16 2016 -0500
Committer: randgalt <ra...@apache.org>
Committed: Mon May 30 21:13:16 2016 -0500

----------------------------------------------------------------------
 .../apache/curator/framework/recipes/cache/PathChildrenCache.java   | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/4fb08957/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/PathChildrenCache.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/PathChildrenCache.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/PathChildrenCache.java
index eb98e6a..91a3a98 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/PathChildrenCache.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/PathChildrenCache.java
@@ -493,6 +493,7 @@ public class PathChildrenCache implements Closeable
             {
                 if (PathChildrenCache.this.state.get().equals(State.CLOSED)) {
                     // This ship is closed, don't handle the callback
+                    PathChildrenCache.this.client.removeWatchers();
                     return;
                 }
                 if ( event.getResultCode() == KeeperException.Code.OK.intValue() )