code: private boolean hasOutputChanged(ChannelHandlerContext ctx, boolean first) {
          if (observeOutput) {
  
              // We can take this shortcut if the ChannelPromises that got passed into write()
              // appear to complete. It indicates "change" on message level and we simply assume
              // that there's change happening on byte level. If the user doesn't observe channel
              // writability events then they'll eventually OOME and there's clearly a different
              // problem and idleness is least of their concerns.
              if (lastChangeCheckTimeStamp != lastWriteTime) {
                  lastChangeCheckTimeStamp = lastWriteTime;
  
                  // But this applies only if it's the non-first call.
                  if (!first) {
                      return true;
                  }
              }
  
              Channel channel = ctx.channel();
              Unsafe unsafe = channel.unsafe();
              ChannelOutboundBuffer buf = unsafe.outboundBuffer();
  
              if (buf != null) {
                  int messageHashCode = System.identityHashCode(buf.current());
                  long pendingWriteBytes = buf.totalPendingWriteBytes();
  
                  if (messageHashCode != lastMessageHashCode || pendingWriteBytes != lastPendingWriteBytes) {
                      lastMessageHashCode = messageHashCode;
                      lastPendingWriteBytes = pendingWriteBytes;
  
                      if (!first) {
                          return true;
                      }
                  }
  
                  long flushProgress = buf.currentProgress();
                  if (flushProgress != lastFlushProgress) {
                      lastFlushProgress = flushProgress;
  
                      if (!first) {
                          return true;
                      }
                  }
              }
          }
  
          return false;
      }
docs: Returns {@code true} if and only if the {@link IdleStateHandler} was constructed
  with {@link #observeOutput} enabled and there has been an observed change in the
  {@link ChannelOutboundBuffer} between two consecutive calls of this method.
  
  https://github.com/netty/netty/issues/6150