Skip to content

Commit 7358fc4

Browse files
authored
fix: don't stop the room receive loop on exception (#63)
1 parent c5e0e26 commit 7358fc4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

livekit/room.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,12 @@ async def _listen_task(self) -> None:
174174

175175
event = wait_event_future.result()
176176
if event.room_event.room_handle == self._ffi_handle.handle: # type: ignore
177-
self._on_room_event(event.room_event)
177+
try:
178+
self._on_room_event(event.room_event)
179+
except Exception as e:
180+
logging.error(
181+
'error running user callback for %s: %s',
182+
event.room_event.WhichOneof('message'), e)
178183

179184
# wait for the subscribers to process the event
180185
# before processing the next one

0 commit comments

Comments
 (0)