8000 [HttpClient] Don't pass float to usleep() · symfony/symfony@33424ab · GitHub
[go: up one dir, main page]

Skip to content

Commit 33424ab

Browse files
committed
[HttpClient] Don't pass float to usleep()
Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent fa2ae46 commit 33424ab

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/HttpClient/Response/CurlResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ private static function select(ClientState $multi, float $timeout): int
353353
}
354354

355355
if ($multi->pauseExpiries && 0 < $timeout -= microtime(true) - $now) {
356-
usleep(1E6 * $timeout);
356+
usleep((int) (1E6 * $timeout));
357357
}
358358

359359
return 0;

src/Symfony/Component/HttpClient/Response/NativeResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ private static function select(ClientState $multi, float $timeout): int
366366
}
367367

368368
if (!$handles) {
369-
usleep(1E6 * $timeout);
369+
usleep((int) (1E6 * $timeout));
370370

371371
return 0;
372372
}

0 commit comments

Comments
 (0)
0