We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bdc6191 commit 09cd0bcCopy full SHA for 09cd0bc
1 file changed
src/StreamSelectLoop.php
@@ -159,7 +159,11 @@ public function run()
159
if ($timeout < 0) {
160
$timeout = 0;
161
} else {
162
- $timeout *= self::MICROSECONDS_PER_SECOND;
+ /*
163
+ * round() needed to correct float error:
164
+ * https://github.com/reactphp/event-loop/issues/48
165
+ */
166
+ $timeout = round($timeout * self::MICROSECONDS_PER_SECOND);
167
}
168
169
// The only possible event is stream activity, so wait forever ...
0 commit comments