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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to