8000 gh-95051: ensure that timeouts scheduled with `asyncio.Timeout` that have already expired are deliverered promptly by graingert · Pull Request #95109 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-95051: ensure that timeouts scheduled with asyncio.Timeout that have already expired are deliverered promptly #95109

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 9 commits into from
Jul 24, 2022
Prev Previous commit
Next Next commit
Update Lib/asyncio/timeouts.py
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
  • Loading branch information
graingert and gvanrossum authored Jul 22, 2022
commit 6b01baac29fc546ff48d2a1bbabc62966917ddf7
2 changes: 1 addition & 1 deletion Lib/asyncio/timeouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def reschedule(self, when: Optional[float]) -> None:
self._timeout_handler = None
else:
loop = events.get_running_loop()
if loop.time() >= when:
if when <= loop.time():
self._timeout_handler = loop.call_soon(self._on_timeout)
else:
self._timeout_handler = loop.call_at(when, self._on_timeout)
Expand Down
0