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/20 08:11:23 UTC
[GitHub] [zookeeper] smallYellowCat opened a new pull request #1646: ZOOKEEPER-4218:zooKeeperSaslClient will product a null state event and then caused NPE while used switch(state) to deal with event
smallYellowCat opened a new pull request #1646:
URL: https://github.com/apache/zookeeper/pull/1646
while excute zooKeeperSaslClient.initialize(ClientCnxn.this) occurred some exception, at time saslState is SaslState.INITIAL, and then sendAuthEvent will be set true, but KeeperState authState = zooKeeperSaslClient.getKeeperState() will return null authState, so client will create a null state event.
--
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
[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
Posted by GitBox <gi...@apache.org>.
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