Commit 48ddde4
committed
bug #62503 [HttpClient] Fix releasing uploaded stream resources (nicolas-grekas)
This PR was merged into the 6.4 branch.
Discussion
----------
[HttpClient] Fix releasing uploaded stream resources
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix #60506
| License | MIT
The recursive closure kept $streams (and therefore the original resources) reachable until the GC cycle collector ran, so multipart uploads held file handles even after the request lifecyle ended. Setting $caster = null breaks the cycle immediately, letting the resources be released right after the request.
Commits
-------
9fc5ab8 [HttpClient] Fix releasing uploaded stream resources1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
| 358 | + | |
358 | 359 | | |
359 | 360 | | |
360 | 361 | | |
| |||
0 commit comments