We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b56e013 commit c0e70b1Copy full SHA for c0e70b1
plugins/openai/vision_agents/plugins/openai/rtc_manager.py
@@ -294,5 +294,11 @@ async def close(self) -> None:
294
self._audio_to_openai_track.stop()
295
if self._video_to_openai_track is not None:
296
self._video_to_openai_track.stop()
297
- close_coro = self.pc.close()
298
- await asyncio.to_thread(lambda: asyncio.run(close_coro))
+
+ async def _safe_close():
299
+ try:
300
+ await self.pc.close()
301
+ except Exception as e:
302
+ logger.error(f"Error closing peer connection: {e}")
303
304
+ asyncio.create_task(_safe_close())
0 commit comments