maxAttempts property

int? maxAttempts

The maximum attempts to connect.

The attempts will be reset when the replicator is able to connect and replicate with the remote server again.

Setting the maxAttempts value to null, the default max attempts of 10 times for single shot replicators and infinite times for continuous replicators will be applied. Setting the value to 1 with result in no retry attempts.

Setting 0 a negative number will result in an RangeError being thrown.

Implementation

int? get maxAttempts => _maxAttempts;
void maxAttempts=(int? maxAttempts)

Implementation

set maxAttempts(int? maxAttempts) {
  if (maxAttempts != null && maxAttempts <= 0) {
    throw RangeError.range(maxAttempts, 1, null, 'maxAttempts');
  }
  _maxAttempts = maxAttempts;
}