pooledRetry<R> method
Makes a call using a Pool
whith retry semantics in case of error
pool
: ThePool
fn
: The delegate to run in thePool
retryOptions
: TheRetryOptions
for this call
Returns a Future for the completion of the delegate
Implementation
Future<R> pooledRetry<R>(Pool pool, FutureOr<R> Function() fn,
{RetryOptions? retryOptions}) {
return pooled(
pool,
() => (retryOptions ??
RetryOptions(maxAttempts: options.retryMaxAttempts))
.retry(fn, retryIf: (e) => isDioError(e)));
}