Skip to content

Commit bbcbbbe

Browse files
[HttpClient] workaround curl_multi_select() issue
1 parent b9f2aa7 commit bbcbbbe

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Response/CurlResponse.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,11 @@ private static function perform(CurlClientState $multi, array &$responses = null
274274
*/
275275
private static function select(CurlClientState $multi, float $timeout): int
276276
{
277+
if (\PHP_VERSION_ID < 70123 || (70200 <= \PHP_VERSION_ID && \PHP_VERSION_ID < 70211)) {
278+
// workaround https://bugs.php.net/76480
279+
$timeout = min($timeout, 0.01);
280+
}
281+
277282
return curl_multi_select($multi->handle, $timeout);
278283
}
279284

0 commit comments

Comments
 (0)