Skip to content

Websocket error handling hook #1981

Open
@bdarnell

Description

@bdarnell

WebSocketHandler doesn't currently have a good way of installing a class-wide handler for uncaught exceptions. The only way is to override _run_callback, but that's awkward (and the method is changing in Tornado 4.5 so naive overrides may break the ability to use coroutines). We should add an explicit error-handling hook.

The add_future call to f.result() also needs to be refactored so its exceptions can be handled in the same way instead of escaping to the IOLoop.

See https://stackoverflow.com/questions/42822958/tornado-websocket-handler-uncaught-exception/43017469#43017469

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions