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

websocket: avoid WebSocketClosedError double/nested exception #2926

Closed

Commits on Sep 30, 2020

  1. websocket: avoid WebSocketClosedError double/nested exception

    Tracking the exception that was being handled when another exception
    was raised is a new feature in Python-3, causing this:
    
        Traceback (most recent call last):
          File "/...-packages/tornado/websocket.py", line 1104, in wrapper
            await fut
        tornado.iostream.StreamClosedError: Stream is closed
    
        During handling of the above exception, another exception occurred:
    
        Traceback (most recent call last):
          File "/...-packages/tornado/websocket.py", line 1106, in wrapper
            raise WebSocketClosedError()
        tornado.websocket.WebSocketClosedError
    
    This can be selectively avoided using the new Python-3 syntax:
    
        raise WebSocketClosedException from None
    ploxiln committed Sep 30, 2020
    Configuration menu
    Copy the full SHA
    7566672 View commit details
    Browse the repository at this point in the history