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
bug #48501 [RateLimiter] Add int to Reservation::wait() (DaRealFreak)
This PR was submitted for the 6.3 branch but it was merged into the 5.4 branch instead.
Discussion
----------
[RateLimiter] Add `int` to `Reservation::wait()`
| Q | A
| ------------- | ---
| Branch? | 5.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#48500
| License | MIT
The `usleep` function accepts int as parameter type (https://www.php.net/manual/en/function.usleep.php), while the passed type is float in `Reservation::wait` (due to `Reservation::getWaitDuration` returning a float value for the 1e6 multiplication)
To prevent deprecation notices we can typecast the float value to int before passing it to `usleep`
Commits
-------
6ad3279 [RateLimiter] Add typecast to Reservation::wait
0 commit comments