Skip to content

Commit

Permalink
transports(daily): cancel messages task when canceling
Browse files Browse the repository at this point in the history
  • Loading branch information
aconchillo committed Oct 16, 2024
1 parent 3391439 commit 8b4362c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pipecat/transports/services/daily.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,13 +740,17 @@ async def stop(self, frame: EndFrame):
self._messages_task.cancel()
await self._messages_task
self._messages_task = None
self._messages_task = None
# Leave the room.
await self._client.leave()

async def cancel(self, frame: CancelFrame):
# Parent stop.
await super().cancel(frame)
# Cancel messages task
if self._messages_task:
self._messages_task.cancel()
await self._messages_task
self._messages_task = None
# Leave the room.
await self._client.leave()

Expand Down

0 comments on commit 8b4362c

Please sign in to comment.