Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix timeout on empty socket in HTTPClient #3478

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

annda
Copy link
Contributor

@annda annda commented Apr 14, 2021

feof() sometimes hangs if nothing has been written yet, so we skip the check initially.

See php/php-src#3729

feof() sometimes hangs if nothing has beeen written yet
see php/php-src#3729
@splitbrain
Copy link
Collaborator

Some additional info: we had this problem on only one machine with PHP 7.0 when trying to fetch data from a github URL. It may or may not be related to the issue mentioned above. Some additional testing on different PHP versions would be helpful to see if we can pinpoint if feof always hangs on certain PHP releases or if there are other circumstances involved.

The fix suggested above is slightly sub-optimal because it will result in hanging until a timeout on sockets that get immeadiately closed after opening for some reason.

This may or may not be slightly related to #3474

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

Successfully merging this pull request may close these issues.

None yet

2 participants