curl_multi_remove_handle($multi->handle,
$ch);
$waitFor[1
] =
(string) ((int) $waitFor[1
] - 1
); // decrement the retry counter
curl_setopt($ch, \CURLOPT_PRIVATE,
$waitFor);
curl_setopt($ch, \CURLOPT_FORBID_REUSE, true
);
if (0 ===
curl_multi_add_handle($multi->handle,
$ch)) { continue;
} } if (\CURLE_RECV_ERROR ===
$result && 'H' ===
$waitFor[0
] && 400
<= ($responses[(int) $ch]->info
['http_code'
] ?? 0
)) { $multi->handlesActivity
[$id][] =
new FirstChunk();
} $multi->handlesActivity
[$id][] = null;
$multi->handlesActivity
[$id][] = \
in_array($result,
[\CURLE_OK, \CURLE_TOO_MANY_REDIRECTS
], true
) || '_0' ===
$waitFor ||
curl_getinfo($ch, \CURLINFO_SIZE_DOWNLOAD
) ===
curl_getinfo($ch, \CURLINFO_CONTENT_LENGTH_DOWNLOAD
) ? null :
new TransportException(ucfirst(curl_error($ch) ?:
curl_strerror($result)).
sprintf(' for "%s".',
curl_getinfo($ch, \CURLINFO_EFFECTIVE_URL
)));
} } finally { $multi->performing = false;
} } /**
* @param CurlClientState $multi
*/