docs: private boolean closeInternal(ErrorCode errorCode, @Nullable IOException errorException) {
      assert (!Thread.holdsLock(this));
      synchronized (this) {
        if (this.errorCode != null) {
          return false;
        }
        if (source.finished && sink.finished) {
          return false;
        }
        this.errorCode = errorCode;
        this.errorException = errorException;
        notifyAll();
      }
      connection.removeStream(id);
      return true;
    }