Skip to content

Commit

Permalink
fix: don't stop the room receive loop on exception (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom authored Sep 19, 2023
1 parent c5e0e26 commit 7358fc4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion livekit/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,12 @@ async def _listen_task(self) -> None:

event = wait_event_future.result()
if event.room_event.room_handle == self._ffi_handle.handle: # type: ignore
self._on_room_event(event.room_event)
try:
self._on_room_event(event.room_event)
except Exception as e:
logging.error(
'error running user callback for %s: %s',
event.room_event.WhichOneof('message'), e)

# wait for the subscribers to process the event
# before processing the next one
Expand Down

0 comments on commit 7358fc4

Please sign in to comment.