You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
there is a return statement in a finally block, which would swallow any in-flight exception.
This means that if an exception other than asyncio.CancelledError (including a BaseException such as KeyboardInterrupt) is raised from the try body, it will not propagate on as expected if this return statement is executed.
Is there an existing issue for this?
Describe the bug
In https://github.com/sanic-org/sanic/blob/main/sanic/server/websockets/impl.py#L437
and
sanic/sanic/server/websockets/impl.py
Line 463 in da1c646
return
statement in afinally
block, which would swallow any in-flight exception.This means that if an exception other than
asyncio.CancelledError
(including aBaseException
such asKeyboardInterrupt
) is raised from thetry
body, it will not propagate on as expected if this return statement is executed.See also https://docs.python.org/3/tutorial/errors.html#defining-clean-up-actions.
Code snippet
No response
Expected Behavior
No response
How do you run Sanic?
Sanic CLI
Operating System
Linux
Sanic Version
main branch
Additional context
No response
The text was updated successfully, but these errors were encountered: