mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-28 11:09:26 +00:00
4bf7292438
* Rate limit fix If $elapsed_seconds > $this->intervalSeconds the first time hasRequestQuota() is called, rateLimitReached is never set to true and the limit is not enforced This can happen if the rate limit is set in a callback function some time after starting I completely removed $rateLimitReached since its only use was in the removed condition check Alternatively, it should be possible to reinitialize currentStartTime when setRateLimit is called, but I still don't really see the usefulness of resetting the timer only when the limit was reached in the previous interval * Rename variable * Clean up --------- Co-authored-by: Riccardo Nava <116394015+ricnava00@users.noreply.github.com>