Github user lujiefsi commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/544#discussion_r195967959 --- Diff: src/java/main/org/apache/zookeeper/server/NIOServerCnxnFactory.java --- @@ -165,9 +168,13 @@ public void removeCnxn(NIOServerCnxn cnxn) { } synchronized (ipMap) { - Set<NIOServerCnxn> s = - ipMap.get(cnxn.getSocketAddress()); - s.remove(cnxn); + InetAddress addr = cnxn.getSocketAddress(); + if (addr != null) { --- End diff -- tabs led the bad coding style, I have removed it.
---