233
err := backoff.ThrottleRetryContext(ctx, r.loadEndpoints, r.config.refreshRetryPolicy, nil)
234
if err == nil {
236
>
enforceMinWait = false
237
>
// Note: do not reload r.dataReady here, use value from argument to ensure that
238
>
// each channel is closed no more than once.
239
>
close(dataReady.ready)
240
>
}
241
>
} else {
242
>
r.dataLock.Lock()
243
>
prevTableVersion := r.tableVersion
244
>
r.dataLock.Unlock()
245
>
246
>
// Endpoints have previously been loaded, so just keep them up to date with long poll requests to
247
>
// matching, without fallback to persistence. Ignoring long poll errors since we will just retry
248
>
// on next loop iteration.
249
>
_ = backoff.ThrottleRetryContext(ctx, r.refreshEndpoints, r.config.refreshRetryPolicy, nil)
250
>
251
>
r.dataLock.Lock()
252
>
enforceMinWait = prevTableVersion == r.tableVersion
253
>
r.dataLock.Unlock()
254
>
}
255
elapsed := time.Since(start)
256