Skip to content
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

♲ Stop handling EINTR around time.sleep() #652

Merged
1 commit merged into from
Mar 23, 2024
Merged
Changes from all commits
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
4 changes: 1 addition & 3 deletions cheroot/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1729,9 +1729,7 @@
"""Run the server forever, and stop it cleanly on exit."""
try:
self.start()
except (KeyboardInterrupt, IOError):
# The time.sleep call might raise
# "IOError: [Errno 4] Interrupted function call" on KBInt.
except KeyboardInterrupt:

Check warning on line 1732 in cheroot/server.py

View check run for this annotation

Codecov / codecov/patch

cheroot/server.py#L1732

Added line #L1732 was not covered by tests
self.error_log('Keyboard Interrupt: shutting down')
self.stop()
raise
Expand Down
Loading