mirror of https://gitlab.com/litecord/litecord.git
only dispatch to states with websockets
This commit is contained in:
parent
de8954066a
commit
64498ba3f2
|
|
@ -30,9 +30,10 @@ async def send_event_to_states(
|
|||
"""Dispatch an event to a list of states."""
|
||||
res = []
|
||||
|
||||
event, data = event_data
|
||||
for state in states:
|
||||
try:
|
||||
event, data = event_data
|
||||
if state.ws:
|
||||
await state.ws.dispatch(event, data)
|
||||
res.append(state.session_id)
|
||||
except Exception:
|
||||
|
|
|
|||
Loading…
Reference in New Issue