broadcaster
broadcaster copied to clipboard
Unsubscribe properly for the disconnection of WebSocket
The exception raised by WebSocket disconnection fails the unsubscribing behavior of the Subscriber context manager.
Fixed it by moving the unsubscribing snippet to the finally block.
The try should maybe be moved down to before the yield.
Fixed in https://github.com/encode/broadcaster/pull/112