Github user anmolnar commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/669#discussion_r233282137
  
    --- Diff: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/NettyServerCnxnFactory.java
 ---
    @@ -316,16 +251,17 @@ public void operationComplete(ChannelFuture future)
                         if (KeeperException.Code.OK !=
                                 authProvider.handleAuthentication(cnxn, null)) 
{
                             LOG.error("Authentication failed for session 0x{}",
    -                                Long.toHexString(cnxn.sessionId));
    +                                Long.toHexString(cnxn.getSessionId()));
                             cnxn.close();
                             return;
                         }
     
    -                    allChannels.add(future.getChannel());
    +                    final Channel futureChannel = future.getNow();
    --- End diff --
    
    I think `get()` would be enough, but the check is harmful anyway.


---

Reply via email to