Github user d2r commented on a diff in the pull request:

    https://github.com/apache/storm/pull/838#discussion_r45515312
  
    --- Diff: 
storm-core/src/jvm/backtype/storm/messaging/netty/StormServerHandler.java ---
    @@ -25,33 +26,39 @@
     import org.jboss.netty.channel.SimpleChannelUpstreamHandler;
     import org.slf4j.Logger;
     import org.slf4j.LoggerFactory;
    -import java.util.List;
     import java.util.concurrent.atomic.AtomicInteger;
     
    -class StormServerHandler extends SimpleChannelUpstreamHandler  {
    +public class StormServerHandler extends SimpleChannelUpstreamHandler  {
         private static final Logger LOG = 
LoggerFactory.getLogger(StormServerHandler.class);
    -    Server server;
    +    IServer server;
         private AtomicInteger failure_count; 
    +    private Channel channel;
         
    -    StormServerHandler(Server server) {
    +    public StormServerHandler(IServer server) {
             this.server = server;
             failure_count = new AtomicInteger(0);
         }
         
         @Override
         public void channelConnected(ChannelHandlerContext ctx, 
ChannelStateEvent e) {
    -        server.addChannel(e.getChannel());
    +        server.channelConnected(e.getChannel());
    +        if(channel != null) {
    +            LOG.debug("Replacing channel with new channel: "
    +                      + channel.toString() + " -> " + 
e.getChannel().toString());
    --- End diff --
    
    Use format string for log message


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to