SammyVimes commented on code in PR #1016:
URL: https://github.com/apache/ignite-3/pull/1016#discussion_r955922081


##########
modules/network/src/main/java/org/apache/ignite/internal/network/netty/NettyUtils.java:
##########
@@ -38,18 +41,21 @@ public class NettyUtils {
      * @return CompletableFuture.
      */
     public static <T, R, F extends Future<R>> CompletableFuture<T> 
toCompletableFuture(
-            F nettyFuture,
+            @Schedule F nettyFuture,
             Function<F, T> mapper
     ) {
         var fut = new CompletableFuture<T>();
 
-        nettyFuture.addListener((F future) -> {
-            if (future.isSuccess()) {
-                fut.complete(mapper.apply(future));
-            } else if (future.isCancelled()) {
-                fut.cancel(true);
-            } else {
-                fut.completeExceptionally(future.cause());
+        nettyFuture.addListener(new GenericFutureListener<F>() {
+            @Override
+            public void operationComplete(@Execute F future) throws Exception {

Review Comment:
   TIL that it is possible



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