You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2021/03/26 03:32:48 UTC

[GitHub] [zookeeper] maoling commented on a change in pull request #1646: ZOOKEEPER-4218:zooKeeperSaslClient will product a null state event and then caused NPE while used switch(state) to deal with event

maoling commented on a change in pull request #1646:
URL: https://github.com/apache/zookeeper/pull/1646#discussion_r601994178



##########
File path: zookeeper-server/src/main/java/org/apache/zookeeper/client/ZooKeeperSaslClient.java
##########
@@ -369,6 +370,7 @@ private void sendSaslPacket(ClientCnxn cnxn) throws SaslException {
         try {
             cnxn.sendPacket(request, response, cb, ZooDefs.OpCode.sasl);
         } catch (IOException e) {
+            saslState = SaslState.FAILED;
             throw new SaslException("Failed to send SASL packet to server due " + "to IOException:", e);
         }
     }

Review comment:
       @smallYellowCat 
   Could you please add an unit case for this change?




-- 
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:
users@infra.apache.org