-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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
Conversation
derrabus
commented
Jun 22, 2020
Q | A |
---|---|
Branch? | 4.4 |
Bug fix? | yes |
New feature? | no |
Deprecations? | no |
Tickets | Fix #37378 |
License | MIT |
Doc PR | N/A |
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) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Thank you @derrabus. |