We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1fcbb1c commit f8b0605Copy full SHA for f8b0605
agents/src/worker.ts
@@ -348,11 +348,12 @@ export class AgentServer {
348
return { healthy: false, message: 'inference process not running' };
349
}
350
351
- // Check if we've lost connection to LiveKit (session closed unintentionally)
+ // Only healthy when fully connected with an active WebSocket
352
if (
353
- !this.#closed &&
354
- !this.#connecting &&
355
- (!this.#session || this.#session.readyState !== WebSocket.OPEN)
+ this.#closed ||
+ this.#connecting ||
+ !this.#session ||
356
+ this.#session.readyState !== WebSocket.OPEN
357
) {
358
return { healthy: false, message: 'not connected to livekit' };
359
0 commit comments