Ratelimit on multiple threads reset counter
Using multiple goroutines my ratelimit-observed on unauthenticated call is reset to 0
Steps to reproduce
Using this gist https://gist.github.com/Lorac/6cef9747e6e668e99b4c246bfe8d9408
You gonna have to change one line in the source code
Comment that line : https://github.com/xanzy/go-gitlab/blob/26ea551e8c159cea42a9f206bc18ae5884d44d0c/gitlab.go#L554 to have unauthenticated calls
Current version of gitlab on live servers
What is the current bug behavior?
Resets the ratelimit to zero, so in theory I could abuse the API by using multiple threads...? You can do the same thing with cURL
What is the expected correct behavior?
The ratelimit should keep incrementing even if I started multiple threads
Relevant logs and/or screenshots
Very fast output multiple calls...
Ratelimit-Observed: Ratelimit-Observed: Ratelimit-Observed: Ratelimit-Observed: ...
Output of checks
This bug happens on GitLab.com