code: private void advanceBufferIfNecessary() {
      ReadableBuffer buffer = buffers.peek();
      if (buffer.readableBytes() == 0) {
        buffers.remove().close();
      }
    }
docs: If the current buffer is exhausted, removes and closes it.