Skip to content

Commit

Permalink
Update _event_emitter.py
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom committed May 17, 2024
1 parent 7383150 commit a66f7b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion livekit-rtc/livekit/rtc/_event_emitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ def __init__(self) -> None:

def emit(self, event: T, *args, **kwargs) -> None:
if event in self._events:
for callback in self._events[event]:
callables = self._events[event].copy()
for callback in callables:
callback(*args, **kwargs)

def once(self, event: T, callback: Optional[Callable] = None) -> Callable:
Expand Down

0 comments on commit a66f7b0

Please sign in to comment.