8000 StreamSelectLoop: Int overflow if the timer interval is big on 32-bit systems · Issue #19 · reactphp/event-loop · GitHub
[go: up one dir, main page]

Skip to content

StreamSelectLoop: Int overflow if the timer interval is big on 32-bit systems #19

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

Closed
tak3r opened this issue Dec 8, 2014 · 1 comment · Fixed by #132
Closed

StreamSelectLoop: Int overflow if the timer interval is big on 32-bit systems #19

tak3r opened this issue Dec 8, 2014 · 1 comment · Fixed by #132

Comments

@tak3r
Copy link
tak3r commented Dec 8, 2014

if $this->getNextEventTimeInMicroSeconds() in StreamSelectLoop.php returns a float value greater than max int value, it will give you this error

stream_select(): The microseconds parameter must be greater than 0

This will happen if the next event interval is greater than 2148. Or, in other words you can't have a periodic timer with interval greater than 2148 seconds.

Workarounds: have a dummy periodic timer with interval less than 2148 seconds.

@cboden cboden added the bug label Dec 10, 2014
@alexmnv
Copy link
alexmnv commented Feb 5, 2015

It is worth noting that the limit of 2148 seconds is only applied to 32-bit systems. On 64-bit systems it is big enough to not worry about it.
I created a pull request #23 to fix this issue.

@clue clue added the easy pick label Jan 10, 2017
@clue clue changed the title Int overflow if the timer interval is big StreamSelectLoop: Int overflow if the timer interval is big on 32-bit systems Jan 10, 2017
@clue clue added this to the v0.5.0 milestone Dec 4, 2017
@jsor jsor closed this as completed in #132 Dec 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
0