Skip to content

Commit 60877af

Browse files
divinity76nicolas-grekas
authored andcommitted
[HttpClient] Don't ignore errors from curl_multi_exec()
1 parent f13c1e2 commit 60877af

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Response/CurlResponse.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,11 @@ private static function perform(ClientState $multi, array &$responses = null): v
274274
try {
275275
self::$performing = true;
276276
$active = 0;
277-
while (\CURLM_CALL_MULTI_PERFORM === curl_multi_exec($multi->handle, $active));
277+
while (\CURLM_CALL_MULTI_PERFORM === ($err = curl_multi_exec($multi->handle, $active)));
278+
279+
if (\CURLM_OK !== $err) {
280+
throw new TransportException(curl_multi_strerror($err));
281+
}
278282

279283
while ($info = curl_multi_info_read($multi->handle)) {
280284
$result = $info['result'];

0 commit comments

Comments
 (0)