[PR #10656/06db052e backport][3.11] Revert: Close the socket if there's a failure in start_connection() #10464 #10657
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a backport of PR #10656 as merged into master (06db052).
Reverts #10464
While this change improved the situation for uvloop users, it caused a regression with
SelectorEventLoop
(issue #10617)The alternative fix is MagicStack/uvloop#646 (not merged at the time of this PR)
issue #10617 appears to be very similar to python/cpython@d5aeccf
If someone can come up with a working reproducer for #10617 we can revisit this.
cc @top-oai
Minimal implementation that shows on cancellation the socket is cleaned up without the explicit
close
#10617 (comment) so this should be unneeded unless I've missed something (very possible with all the moving parts here)Related issue number
fixes #10617