code: @Override
      public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent event) {
          // register the newly established channel
          Channel channel = event.getChannel();
          LOG.info("connection established to :{}, local port:{}", client.getRemoteAddr(), channel.getLocalAddress());
  
          client.connectChannel(ctx.getChannel());
          client.handleResponse(ctx.getChannel(), null);
      }
docs: Sometime when connecting to a bad channel which isn't writable, this method will be called