closeWithError method

void closeWithError(
  1. dynamic error
)

Implementation

void closeWithError(error) {
  this._watchStatus = WATCH_STATUS.ERRORED;
  this._clearACKSchedule();
  this.listener?.onError?.call(error);
  String queryID =
      this._sessionInfo?.queryID != null ? this._sessionInfo!.queryID! : '';
  this._onWatchClose(this, queryID);

  Console.log(
      '[realtime] client closed (${this._collectionName} ${this._query}) (watchId ${this.watchId})');
}