AMashenkov commented on a change in pull request #161:
URL: https://github.com/apache/ignite-3/pull/161#discussion_r645379887



##########
File path: 
modules/network/src/main/java/org/apache/ignite/network/internal/netty/HandshakeHandler.java
##########
@@ -28,6 +29,8 @@
  * Netty handler of the handshake operation.
  */
 public class HandshakeHandler extends ChannelInboundHandlerAdapter {
+    private static final IgniteLogger LOG = 
IgniteLogger.forClass(HandshakeHandler.class);

Review comment:
       ```suggestion
       /** Logger. */
       private static final IgniteLogger LOG = 
IgniteLogger.forClass(HandshakeHandler.class);
   ```

##########
File path: 
modules/network/src/main/java/org/apache/ignite/network/internal/netty/HandshakeHandler.java
##########
@@ -41,31 +44,38 @@ public HandshakeHandler(HandshakeManager manager) {
     }
 
     /** {@inheritDoc} */
-    @Override public void handlerAdded(ChannelHandlerContext ctx) throws 
Exception {
+    @Override public void handlerAdded(ChannelHandlerContext ctx) {
         HandshakeAction handshakeAction = manager.init(ctx.channel());
 
         handleHandshakeAction(handshakeAction, ctx);
     }
 
     /** {@inheritDoc} */
-    @Override public void channelActive(ChannelHandlerContext ctx) throws 
Exception {
+    @Override public void channelActive(ChannelHandlerContext ctx) {
         HandshakeAction handshakeAction = 
manager.onConnectionOpen(ctx.channel());
 
+        manager.handshakeFuture().whenComplete((unused, throwable) -> {
+            if (throwable != null) {
+                LOG.error("Error when performing handshake", throwable);
+                ctx.close();
+            }
+        });

Review comment:
       ```suggestion
           manager.handshakeFuture().exceptionally((throwable) -> {
               LOG.error("Error when performing handshake", throwable);
               
               ctx.close();            
           });
   ```




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

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


Reply via email to