diff --git a/src/EventLoop/Driver/StreamSelectDriver.php b/src/EventLoop/Driver/StreamSelectDriver.php index 6919e35..4e09e97 100644 --- a/src/EventLoop/Driver/StreamSelectDriver.php +++ b/src/EventLoop/Driver/StreamSelectDriver.php @@ -287,11 +287,13 @@ private function selectStreams(array $read, array $write, float $timeout): void } if ($timeout < 0) { // Only signal callbacks are enabled, so sleep indefinitely. + /** @psalm-suppress ArgumentTypeCoercion */ \usleep(\PHP_INT_MAX); return; } if ($timeout > 0) { // Sleep until next timer expires. + /** @psalm-var positive-int $timeout */ \usleep((int) ($timeout * 1_000_000)); } }