You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by "tisonkun (via GitHub)" <gi...@apache.org> on 2023/05/31 14:01:31 UTC

[GitHub] [curator] tisonkun commented on a diff in pull request #464: CURATOR-673: Complete BackgroundCallback if CuratorFramework got closed

tisonkun commented on code in PR #464:
URL: https://github.com/apache/curator/pull/464#discussion_r1211770824


##########
curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java:
##########
@@ -694,17 +714,46 @@ <DATA_TYPE> void processBackgroundOperation(OperationAndData<DATA_TYPE> operatio
         }
     }
 
+    private void closeOperation(OperationAndData<?> operation) {
+        if (operation.getCallback() == null) {
+            return;
+        }
+        CuratorEvent event = new CuratorEventImpl(this, CuratorEventType.CLOSING, KeeperException.Code.SESSIONEXPIRED.intValue(), null, null, operation.getContext(), null, null, null, null, null, null);

Review Comment:
   ```suggestion
           CuratorEvent event = new CuratorEventImpl(this, CuratorEventType.CLOSING, 0, null, null, operation.getContext(), null, null, null, null, null, null);
   ```
   
   At least we send `0` for listeners.



-- 
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: commits-unsubscribe@curator.apache.org

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