Skip to content

Commit 310f31a

Browse files
Jeroenynicolas-grekas
authored andcommitted
Fix Warning: curl_multi_select(): timeout must be positive
1 parent c9e69c1 commit 310f31a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Response/TransportResponseTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ public static function stream(iterable $responses, ?float $timeout = null): \Gen
299299
continue;
300300
}
301301

302-
if (-1 === self::select($multi, min($timeoutMin, $timeoutMax - $elapsedTimeout))) {
302+
if (-1 === self::select($multi, min($timeoutMin, max(0, $timeoutMax - $elapsedTimeout)))) {
303303
usleep((int) min(500, 1E6 * $timeoutMin));
304304
}
305305

0 commit comments

Comments
 (0)