chia7712 commented on a change in pull request #74: URL: https://github.com/apache/phoenix-omid/pull/74#discussion_r521901189
########## File path: tso-server/src/main/java/org/apache/omid/tso/TSOChannelHandler.java ########## @@ -104,21 +100,23 @@ void reconnect() { // Create the global ChannelGroup channelGroup = new DefaultChannelGroup(TSOChannelHandler.class.getName()); LOG.debug("\tCreating channel to listening for incoming connections in port {}", config.getPort()); - listeningChannel = bootstrap.bind(new InetSocketAddress(config.getPort())); + Channel listeningChannel = bootstrap.bind(new InetSocketAddress(config.getPort())); channelGroup.add(listeningChannel); LOG.debug("\tListening channel created and connected: {}", listeningChannel); } + /** + * @return the listening channels + */ + Set<Channel> channels() { + return channelGroup == null ? Collections.<Channel>emptySet() : new HashSet<>(channelGroup); Review comment: > maybe you could use Collections.unmodifiableSet() ? make sense to me. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to 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