You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by GitBox <gi...@apache.org> on 2021/11/15 06:38:26 UTC

[GitHub] [curator] faucct commented on a change in pull request #401: CURATOR-623 - ChildrenCache (used by Queues) didn't have a ConnectionStateListener

faucct commented on a change in pull request #401:
URL: https://github.com/apache/curator/pull/401#discussion_r749038813



##########
File path: curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/ChildrenCache.java
##########
@@ -86,12 +101,14 @@ private Data(List<String> children, long version)
 
     void start() throws Exception
     {
-        sync(true);
+        client.getConnectionStateListenable().addListener(connectionStateListener);
+        sync();
     }
 
     @Override
     public void close() throws IOException
     {
+        client.getConnectionStateListenable().removeListener(connectionStateListener);

Review comment:
       Should not this be after `client.removeWatchers()`, in reverse order with `#start()`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@curator.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org