docs: @SuppressWarnings({"unchecked", "rawtypes"})
      protected void markWritesBroken(Throwable cause) {
          if (writesBrokenUpdater.compareAndSet(this, 0, 1)) {
              if(UndertowLogger.REQUEST_IO_LOGGER.isDebugEnabled()) {
                  UndertowLogger.REQUEST_IO_LOGGER.debugf(new ClosedChannelException(), "Marking writes broken on channel %s", this);
              }
              handleBrokenSinkChannel(cause);
              safeClose(channel.getSinkChannel());
              synchronized (this) {
                  for (final S channel : pendingFrames) {
                      channel.markBroken();
                  }
                  pendingFrames.clear();
                  for (final S channel : newFrames) {
                      channel.markBroken();
                  }
                  newFrames.clear();
                  for (final S channel : heldFrames) {
                      channel.markBroken();
                  }
                  heldFrames.clear();
              }
          }
      }