Skip to content

gh-88932 socketserver.shutdown: Connect to server socket to wake up the loop #130680

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix exception class in test_write_to_self_on_closed_server
OSError possible on Windows if server closed right before select()
  • Loading branch information
Elchinchel authored Feb 28, 2025
commit 500b45d9031eb5ff78e0713ebbc5133b718eb9c6
2 changes: 1 addition & 1 deletion Lib/test/test_socketserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class MyServer(socketserver.TCPServer):
def serve_forever(self, poll_interval=poll_interval) -> None:
try:
super().serve_forever(poll_interval)
except ValueError:
except (ValueError, OSError):
# In case server was closed before select() was called
return

Expand Down
Loading