Skip to content
This repository has been archived by the owner on Aug 31, 2018. It is now read-only.

Concurrency issue: call .Do() in different goroutines replace CheckRedirect of singleton client #131

Open
vvelikodny opened this issue Sep 8, 2016 · 1 comment

Comments

@vvelikodny
Copy link

I found a bug when call .Do() func in some goroutines concurrently which process requests with redirects.

Each time we call .Do(), CheckRedirect will be replaced here

So any .Do() call with request which have redirect can replace redirectFailed value of other request without redirect, so .Do() return results which change each other.

@vvelikodny vvelikodny changed the title Concurrency issue: call .Do() in different goroutines replace CheckRedirect to last one Concurrency issue: call .Do() in different goroutines replace CheckRedirect of singleton client Sep 8, 2016
@marcosnils
Copy link
Member

@vvelikodny good catch, would you like to submit a PR to fix it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants