broadcaster icon indicating copy to clipboard operation
broadcaster copied to clipboard

Unsubscribe properly for the disconnection of WebSocket

Open as10896 opened this issue 4 years ago • 1 comments

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.

as10896 avatar Jan 13 '22 23:01 as10896

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

andrew222651 avatar May 13 '22 14:05 andrew222651

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

alex-oleshkevich avatar Apr 03 '24 19:04 alex-oleshkevich