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

fix: Avoid CancelledError from being propagated to lifespan's receive() #2367

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jun 13, 2024

  1. fix: Avoid CancelledError from being propagated to lifespan's receive()

    Currently `LifeSpanOn.main()` is excepting `BaseException`, which
    also catches `CancelledError`.
    
    `CancelledError` is used by `asyncio` to signal that a task has been
    cancelled and is not an error condition.
    
    This commit changes the behavior to catch `CancelledError` separately
    and log it as a "Lifespan  task cancelled" instead of letting the error
    propagate.
    bellini666 committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    a3c4247 View commit details
    Browse the repository at this point in the history