curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randg...@apache.org
Subject curator git commit: if the background call happens after closure, remove any watchers
Date Tue, 31 May 2016 02:13:24 GMT
Repository: curator
Updated Branches:
  refs/heads/CURATOR-332 c7f3b006f -> 4fb089575


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-332
Commit: 4fb089575480befa51174d611d141f4d4fb03fff
Parents: c7f3b00
Author: randgalt <randgalt@apache.org>
Authored: Mon May 30 21:13:16 2016 -0500
Committer: randgalt <randgalt@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() )


Mime
View raw message