encode / broadcaster

Broadcast channels for async web apps. 📢
BSD 3-Clause "New" or "Revised" License
1.13k stars 121 forks source link

Unsubscribe properly for the disconnection of WebSocket #58

Closed as10896 closed 8 months ago

as10896 commented 2 years ago

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.

amacfie commented 2 years ago

The try should maybe be moved down to before the yield.

alex-oleshkevich commented 8 months ago

Fixed in https://github.com/encode/broadcaster/pull/112