Skip to content

Commit d650e30

Browse files
authored
Fix Agent Session Race Condition (#688)
1 parent 95ff351 commit d650e30

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/eighty-cobras-arrive.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@livekit/agents': patch
3+
---
4+
5+
Fix agent session race condition by always waiting for activity to start

agents/src/voice/agent_session.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ export class AgentSession<
209209
});
210210
this.roomIO.start();
211211

212-
this.updateActivity(this.agent);
212+
await this.updateActivity(this.agent);
213213

214214
// Log used IO configuration
215215
this.logger.debug(

0 commit comments

Comments
 (0)