Skip to content

Commit a324b70

Browse files
authored
Fix _emit not being awaited
1 parent a6fdb9f commit a324b70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

deepgram/clients/live/v1/async_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ async def _start(self) -> None:
225225
self.logger.error(
226226
f"WebSocket connection closed with code {e.code}: {e.reason}"
227227
)
228-
self._emit(LiveTranscriptionEvents.Error, error=error)
228+
await self._emit(LiveTranscriptionEvents.Error, error=error)
229229
self.logger.debug("AsyncLiveClient._start LEAVE")
230230
raise
231231
except Exception as e:
@@ -235,7 +235,7 @@ async def _start(self) -> None:
235235
"message": f"{e}",
236236
"variant": "",
237237
}
238-
self._emit(LiveTranscriptionEvents.Error, error)
238+
await self._emit(LiveTranscriptionEvents.Error, error)
239239
self.logger.error("Exception in _start: %s", error=error)
240240
self.logger.debug("AsyncLiveClient._start LEAVE")
241241
raise

0 commit comments

Comments
 (0)