anmolnar commented on a change in pull request #730: Zookeeper-3188: Improve resilience to network URL: https://github.com/apache/zookeeper/pull/730#discussion_r260754702
########## File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Leader.java ########## @@ -740,6 +772,18 @@ void shutdown(String reason) { isShutdown = true; } + synchronized void closeSockets() { + if (serverSockets != null) + for (ServerSocket serverSocket : serverSockets) { + if (!serverSocket.isClosed()) + try { + serverSocket.close(); + } catch (IOException e) { + LOG.warn("Ignoring unexpected exception during close" + serverSocket, e); Review comment: Please use built-in message formatter: ``` LOG.warn("Ignoring unexpected exception during close {}", serverSocket, e); ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services