DailyTransport: don't timeout prematurely on join
This commit is contained in:
@@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed an issue where `DailyTransport` would timeout prematurely on join.
|
||||||
|
|
||||||
- Fixed an issue in the runner where starting a DailyTransport room via
|
- Fixed an issue in the runner where starting a DailyTransport room via
|
||||||
`/start` didn't support using the `DAILY_SAMPLE_ROOM_URL` env var.
|
`/start` didn't support using the `DAILY_SAMPLE_ROOM_URL` env var.
|
||||||
|
|
||||||
|
|||||||
@@ -744,7 +744,6 @@ class DailyTransportClient(EventHandler):
|
|||||||
|
|
||||||
self._client.set_user_name(self._bot_name)
|
self._client.set_user_name(self._bot_name)
|
||||||
|
|
||||||
try:
|
|
||||||
(data, error) = await self._join()
|
(data, error) = await self._join()
|
||||||
|
|
||||||
if not error:
|
if not error:
|
||||||
@@ -765,11 +764,7 @@ class DailyTransportClient(EventHandler):
|
|||||||
error_msg = f"Error joining {self._room_url}: {error}"
|
error_msg = f"Error joining {self._room_url}: {error}"
|
||||||
logger.error(error_msg)
|
logger.error(error_msg)
|
||||||
await self._callbacks.on_error(error_msg)
|
await self._callbacks.on_error(error_msg)
|
||||||
except asyncio.TimeoutError:
|
|
||||||
error_msg = f"Time out joining {self._room_url}"
|
|
||||||
logger.error(error_msg)
|
|
||||||
self._joining = False
|
self._joining = False
|
||||||
await self._callbacks.on_error(error_msg)
|
|
||||||
|
|
||||||
async def _join(self):
|
async def _join(self):
|
||||||
"""Execute the actual room join operation."""
|
"""Execute the actual room join operation."""
|
||||||
@@ -828,7 +823,7 @@ class DailyTransportClient(EventHandler):
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
return await asyncio.wait_for(future, timeout=10)
|
return await future
|
||||||
|
|
||||||
async def leave(self):
|
async def leave(self):
|
||||||
"""Leave the Daily room and cleanup resources."""
|
"""Leave the Daily room and cleanup resources."""
|
||||||
|
|||||||
Reference in New Issue
Block a user