Skip to content

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

Merged
asvetlov merged 2 commits into
python:mainfrom
mhils:issue-43253
Mar 15, 2022
Merged

bpo-43253: don't shutdown invalid socket handles#31892
asvetlov merged 2 commits into
python:mainfrom
mhils:issue-43253

Conversation

@mhils

@mhils mhils commented Mar 15, 2022

Copy link
Copy Markdown
Contributor

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

hugovk commented Mar 15, 2022

Copy link
Copy Markdown
Member

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

mhils commented Mar 15, 2022

Copy link
Copy Markdown
Contributor Author

Thanks for the heads-up, @hugovk! 🍰

@miss-islington

Copy link
Copy Markdown
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
Copy Markdown
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
…-31892)

(cherry picked from commit 7015541)

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
@bedevere-bot

Copy link
Copy Markdown

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
…-31892)

(cherry picked from commit 7015541)

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
@bedevere-bot

Copy link
Copy Markdown

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
(cherry picked from commit 7015541)

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
miss-islington added a commit that referenced this pull request Mar 15, 2022
(cherry picked from commit 7015541)

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
hello-adam pushed a commit to hello-adam/cpython that referenced this pull request Jun 2, 2022
…-31892)

(cherry picked from commit 7015541)

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
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