-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
that's ok as long as it always returns CURLM_OK, which it is supposed to do, in lack of errors,
but per https://curl.haxx.se/libcurl/c/libcurl-errors.html it can also return other values, for example:
CURLM_OK (0)
Things are fine.
CURLM_OUT_OF_MEMORY (3)
You are doomed.
CURLM_UNKNOWN_OPTION (6)
curl_multi_setopt() with unsupported option (Added in 7.15.4)
CURLM_INTERNAL_ERROR (4)
This can only be returned if libcurl bugs. Please report it to us!
i suggest that instead of our current
while (curl_multi_exec($this->handle, $runningCount) === CURLM_CALL_MULTI_PERFORM);approach, we do something like
do{
$err = curl_multi_exec($this->handle, $runningCount);
} while($err === CURLM_CALL_MULTI_PERFORM);
if($err !== CURLM_OK){
throw new \RuntimeException(...)
}also error info can be obtained by doing something like:
$errinfo = [
"multi_exec_return" => $err,
"curl_multi_errno" => curl_multi_errno($mh),
"curl_multi_strerror" => curl_multi_strerror($err)
];Metadata
Metadata
Assignees
Labels
No labels