Github user phunt commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/525#discussion_r189666458
--- Diff:
src/java/main/org/apache/zookeeper/server/NIOServerCnxnFactory.java ---
@@ -815,8 +815,11 @@ public void touchCnxn(NIOServerCnxn cnxn) {
cnxnExpiryQueue.update(cnxn, cnxn.getSessionTimeout());
}
- private void addCnxn(NIOServerCnxn cnxn) {
+ private void addCnxn(NIOServerCnxn cnxn) throws IOException {
InetAddress addr = cnxn.getSocketAddress();
+ if (addr == null) {
+ throw new IOException("Scoket of " + cnxn + " has been
closed");
--- End diff --
fix the spelling.
---