Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[HttpClient] Support for cURL handler objects #37379

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

Merged
merged 1 commit into from
Jun 24, 2020

Conversation

derrabus
Copy link
Member

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #37378
License MIT
Doc PR N/A

@derrabus
Copy link
Member Author

Note: The php 8 build on Travis will fail until php/php-src@26171c3 lands in their nightly build. I've run the tests locally.

@@ -347,7 +347,7 @@ public function reset()
}

foreach ($this->multi->openHandles as [$ch]) {
if (\is_resource($ch)) {
if (\is_resource($ch) || $ch instanceof \CurlHandle) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering, why are these is_resource checks necessary in the first place? Are they getting closed somehow without being removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question indeed. I haven't found a reason why $ch should be anything else than a cURL handle. And the tests still pass if I remove the two guard clauses.

Maybe @nicolas-grekas knows more about why we need(ed?) this check.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen strange things happen at destructing/shutdown time, this might be related.

@nicolas-grekas nicolas-grekas added this to the 4.4 milestone Jun 22, 2020
@fabpot fabpot force-pushed the bugfix/php8-curl branch from f9bafa9 to 7ccc2e1 Compare June 24, 2020 08:43
@fabpot
Copy link
Member

fabpot commented Jun 24, 2020

Thank you @derrabus.

@fabpot fabpot merged commit b3adba8 into symfony:4.4 Jun 24, 2020
@derrabus derrabus deleted the bugfix/php8-curl branch June 24, 2020 09:34
This was referenced Jul 24, 2020
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.

5 participants