Github user hanm commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/544#discussion_r195958750
--- 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 --
coding style issue: need one more space before the if statement so it
aligns with previous statement. Other than this, patch looks good.
---