net/http: Request with canceled context produces undefined behaviour #43082
What version of Go are you using (go version)?
Does this issue reproduce with the latest release?
What did you do?
Hi there. I got undefined behaviour of stdlib http client. The library (stripe-go) uses stdlib and relies on cancelation of request by context.Context.
Problem code here in function named
Select statement don't guarantee of execution order. So with manually canceled context before request I got:
Could you implement some
My point is - don't return error for allow to do fewer count of retries. Unfortunately stripe-go used a retry for request with canceled so chance to send request was multiplied by retry count. It was fixed in recent: stripe/stripe-go#1184
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: