You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
maybe moving the _backend.subscribe call outside the try block: when that call fails you can probably skip self._backend.unsubscribe. You'd still need to put a None in the queue though.
I could prepare a PR with any of those if they make sense.
The text was updated successfully, but these errors were encountered:
Hi maintainers, thank you for the package !
This line can fail with a
ConnectionError
, at least when using the Redis backend, possibly others too:broadcaster/broadcaster/_base.py
Line 95 in 69cf29a
When that happens,
queue
is never added toself._subscribers[channel]
.But the
finally
block will try to remove it nonetheless, causing aKeyError
and hiding the original issue:broadcaster/broadcaster/_base.py
Line 102 in 69cf29a
Possible solutions:
discard
instead ofremove
_backend.subscribe
call outside thetry
block: when that call fails you can probably skipself._backend.unsubscribe
. You'd still need to put aNone
in the queue though.I could prepare a PR with any of those if they make sense.
The text was updated successfully, but these errors were encountered: