8000 [RateLimiter] Fix sleep value by jderusse · Pull Request #40658 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[RateLimiter] Fix sleep value #40658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2021
Merged

Conversation

jderusse
Copy link
Member
Q A
Branch? 5.2
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #40656
License MIT
Doc PR

sleep vs usleep

Copy link
Member
@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your change is correct. But I have one suggestion.

Copy link
Member
@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@Nyholm
Copy link
Member
Nyholm commented Mar 31, 2021

Btw, doing sleep(-3) is a fatal error in PHP8. (https://3v4l.org/lK3uR)

Are we sure this method is always called when there are time left to wait? Or should we do max(0, ...) just to be sure?

Copy link
Member
@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

Sorry for all the comments on this small patch.

@nicolas-grekas
Copy link
Member

Thank you @jderusse.

@nicolas-grekas nicolas-grekas merged commit 4d23fec into symfony:5.2 Apr 1, 2021
@fabpot fabpot mentioned this pull request May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@Nyholm Nyholm Nyholm approved these changes

@wouterj wouterj Awaiting requested review from wouterj

Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0