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

Skip to content

bpo-43253: don't shutdown invalid socket handles #31892

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 2 commits into from
Mar 15, 2022

Conversation

mhils
Copy link
Contributor

@mhils mhils commented Mar 15, 2022

On Windows on the ProactorEventLoop, there are situations where fileno() returns -1 during socket close, in which case calling shutdown() would raise an OSError. Avoid that by explicitly checking fileno().

https://bugs.python.org/issue43253

@hugovk
Copy link
Member

hugovk commented Mar 15, 2022

If you merge/rebase main the Docs failure should be fixed (in #31893).

mhils and others added 2 commits March 15, 2022 11:12
On Windows on the ProactorEventLoop, there are situations where `fileno()` returns -1
during socket close, in which case calling `shutdown()` would raise an OSError.
Avoid that by explicitly checking `fileno()`.
@mhils
Copy link
Contributor Author

mhils commented Mar 15, 2022

Thanks for the heads-up, @hugovk! 🍰

@asvetlov asvetlov merged commit 7015541 into python:main Mar 15, 2022
@asvetlov asvetlov added needs backport to 3.9 only security fixes needs backport to 3.10 only security fixes labels Mar 15, 2022
@miss-islington
Copy link
Contributor

Thanks @mhils for the PR, and @asvetlov for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @mhils for the PR, and @asvetlov for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 15, 2022
@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Mar 15, 2022
@bedevere-bot
Copy link

GH-31905 is a backport of this pull request to the 3.9 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 15, 2022
@bedevere-bot
Copy link

GH-31906 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Mar 15, 2022
miss-islington added a commit that referenced this pull request Mar 15, 2022
miss-islington added a commit that referenced this pull request Mar 15, 2022
hello-adam pushed a commit to hello-adam/cpython that referenced this pull request Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants