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 12:10:01 UTC

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

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



##########
File path: curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/ChildrenCache.java
##########
@@ -66,6 +68,19 @@ public void processResult(CuratorFramework client, CuratorEvent event) throws Ex
         }
     };
 
+    private final ConnectionStateListener connectionStateListener = (__, newState) -> {
+        if ((newState == ConnectionState.CONNECTED) || (newState == ConnectionState.RECONNECTED)) {
+            try
+            {
+                sync();
+            }
+            catch ( Exception e )
+            {
+                throw new RuntimeException(e);

Review comment:
       will this error be logged somewhere ?
   as we cannot perform any recovery
   will it make more sense to simply log the exception and do not rethrow it ?
   




-- 
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