backOff method

void backOff(
  1. int retryAfter,
  2. int status
)

Implementation

void backOff(int retryAfter, int status) {
  final until = DateTime.now().add(Duration(seconds: retryAfter > 0 ? min(retryAfter, _maxBackoffSeconds) : _defaultBackoffSeconds));
  backoffUntil = until;
  InnerLog().w('backing off until ${until.toUtc().toIso8601String()}: the server answered $status');
}