Github user breed commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/563#discussion_r205668951
--- Diff: src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java ---
@@ -1128,9 +1128,9 @@ public void processPacket(ServerCnxn cnxn, ByteBuffer
incomingBuffer) throws IOE
Record rsp = processSasl(incomingBuffer,cnxn);
ReplyHeader rh = new ReplyHeader(h.getXid(), 0,
KeeperException.Code.OK.intValue());
cnxn.sendResponse(rh,rsp, "response"); // not sure about
3rd arg..what is it?
- return;
--- End diff --
it would be nice to keep this return since it matches the handling of the
other auth logic above.
it would also be nice if this was an
`} else if (h.getType() == OpCode.sasl) {`
clause and the
`}
else {`
was done outside of the if since all the other blocks will have returned. i
think it makes the logic easier to follow.
---