Skip to content

Conversation

@smallYellowCat
Copy link

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.

…d then caused NPE while used switch(state) to deal with event.
saslState = SaslState.FAILED;
throw new SaslException("Failed to send SASL packet to server due " + "to IOException:", e);
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants