You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I took a stab at tweaking some of the loop accounting to ensure requests are always tried at least once and so client.RetryAttempts represents retries, not total attempts. To the best of my knowledge, that preserves the existing behavior while allowing RetryAttempts to be 0 to disable all retries. Here's what I have so far: main...nojnhuh:go-autorest:retry-fix
Does that seem like a reasonable approach? If so I can open a PR.
Here it's documented that to disable retries, the client's
RetryAttempts
should be set to 1:go-autorest/autorest/client.go
Lines 169 to 171 in 2fa44cb
That value is used here:
go-autorest/autorest/azure/rp.go
Line 41 in 2fa44cb
And gets passed through to here, where the same value is being interpreted as number of retries beyond the first attempt:
go-autorest/autorest/sender.go
Lines 319 to 322 in 2fa44cb
Setting the client's
RetryAttempts
to 1 then ultimately results in requests eligible for retry always occurring twice.The text was updated successfully, but these errors were encountered: