Bug #69607 [Asn->Csd]: curl_multi_select returns -1 for error or non error condition.
| From: | pierrick@php.net | Date: | Wed, 27 Jul 2016 02:27:20 +0000 |
| Subject: | Bug #69607 [Asn->Csd]: curl_multi_select returns -1 for error or non error condition. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-202624@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69607&edit=1
ID: 69607
Updated by: pierrick@php.net
Reported by: daniel dot pitts at cbsinteractive dot com
Summary: curl_multi_select returns -1 for error or non error
condition.
-Status: Assigned
+Status: Closed
Type: Bug
Package: cURL related
Operating System: All
PHP Version: Irrelevant
Assigned To: pierrick
Block user comment: N
Private report: N
New Comment:
The fix for this bug has been committed.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
New functions were added in PHP7.1
https://wiki.php.net/rfc/new-curl-error-functions
Previous Comments:
------------------------------------------------------------------------
[2016-04-24 03:58:56] pierrick@php.net
I started a patch that implement two new functions :
curl_multi_errno and curl_multi_strerror.
In your case you'll have to do curl_multi_strerror(curl_multi_errno($cmh));
This patch should be committed in PHP7.1
------------------------------------------------------------------------
[2015-05-08 17:10:55] daniel dot pitts at cbsinteractive dot com
Description:
------------
curl_multi_select returns -1 for error or non error condition.
If the underlying 'curl_multi_fdset' sets the max_fd to -1, curl_multi_select returns -1.
That isn't an error condition, but a 'please call curl_multi_perform soon' signal.
If the underlying call to 'select' returns error (-1), then it is an error condition.
Unfortunately there is no way from the PHP code to find out if select reported an error, or if the
multi_fdset reported max_fd = -1.
It would be useful if curl_multi_select at least set some value somewhere that would let us know
that the select failed, preferably with info from errno.
$result = curl_multi_select($cmh);
if ($result === -1) {
$err = curl_multi_select_last_error($cmh); // missing this function.
if ($err) {
throw new \Exception($err);
}
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69607&edit=1