Skip to content

Fix 76480: Use curl_multi_wait() so that timeouts are respected - #3509

Closed
adoy wants to merge 3 commits into
php:PHP-7.1from
adoy:bug-76480
Closed

Fix 76480: Use curl_multi_wait() so that timeouts are respected#3509
adoy wants to merge 3 commits into
php:PHP-7.1from
adoy:bug-76480

Conversation

@adoy

@adoy adoy commented Sep 9, 2018

Copy link
Copy Markdown
Member

Bug #76480

libcurl 7.28 introduced curl_multi_wait(), which is a select() wrapper that respects configured timeouts.

This patch will change the implementation of php curl_multi_select to use curl_multi_wait instead of curl_multi_fdset and select. It will fix #76480 but also unliked behaviour like #63411.

Unless anyone have any objection, I plan to commit it on PHP-7.1 since there should not be any BC.

@adoy

adoy commented Sep 9, 2018

Copy link
Copy Markdown
Member Author

FYI, HPHP is already using curl_multi_wait when available as a replacement for curl_multi_fdset + select

@staabm

staabm commented Sep 11, 2018

Copy link
Copy Markdown
Contributor

I guess this should be covered by a unit test

@php-pulls

Copy link
Copy Markdown

Comment on behalf of carusogabriel at php.net:

Labelling

@php-pulls php-pulls added the Bug label Sep 16, 2018
@adoy adoy closed this Sep 18, 2018
@adoy
adoy deleted the bug-76480 branch September 18, 2018 01:53
@adoy

adoy commented Sep 18, 2018

Copy link
Copy Markdown
Member Author

Merged

@xPaw

xPaw commented Oct 17, 2018

Copy link
Copy Markdown
Contributor

Looks like this PR changed return values of curl_multi_select so upgrading to 7.2.11 makes my code run into infinite loops sometimes.

Code I'm running is here: https://github.com/xPaw/Crimp.php/blob/master/Crimp.php

However upon further inspection, I'm not entirely sure why it's doing that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants