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


##########
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:
   I added `getBackgroundEventType` to `BackgroundOperation` in commit 
c18cb6fb6de30aeae4f8d04dcfff3d6e04d49112. `getBackgroundEventType` is somewhat 
an requirement for `abortOperation`, otherwise there is no suitable 
`CuratorEventType` for exception from no ZooKeeper world. Basically, event to 
`BackgroundCallback` has same event type as 
`BackgroundOperation::getBackgroundEventType`. This changes `CONNECTIONLOSS`'s 
event type from `uratorEventType.WATCHED` to its background operation's event 
type. I hope this does not hurt.



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