fix: DeepgramSTTService await is_connected()
This commit is contained in:
@@ -72,6 +72,9 @@ reason")`.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed `DeepgramSTTService._disconnect()` to properly await `is_connected()`
|
||||
method call, which is an async coroutine in the Deepgram SDK.
|
||||
|
||||
- Fixed an issue where the `SmallWebRTCRequest` dataclass in runner would scrub
|
||||
arbitrary request data from client due to camelCase typing. This fixes data
|
||||
passthrough for JS clients where `APIRequest` is used.
|
||||
|
||||
@@ -236,7 +236,7 @@ class DeepgramSTTService(STTService):
|
||||
logger.error(f"{self}: unable to connect to Deepgram")
|
||||
|
||||
async def _disconnect(self):
|
||||
if self._connection.is_connected:
|
||||
if await self._connection.is_connected():
|
||||
logger.debug("Disconnecting from Deepgram")
|
||||
# Deepgram swallows asyncio.CancelledError internally which prevents
|
||||
# proper cancellation propagation. This issue was found with
|
||||
|
||||
Reference in New Issue
Block a user