Skip to content

Commit f8b0605

Browse files
committed
fixes
1 parent 1fcbb1c commit f8b0605

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

agents/src/worker.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,11 +348,12 @@ export class AgentServer {
348348
return { healthy: false, message: 'inference process not running' };
349349
}
350350

351-
// Check if we've lost connection to LiveKit (session closed unintentionally)
351+
// Only healthy when fully connected with an active WebSocket
352352
if (
353-
!this.#closed &&
354-
!this.#connecting &&
355-
(!this.#session || this.#session.readyState !== WebSocket.OPEN)
353+
this.#closed ||
354+
this.#connecting ||
355+
!this.#session ||
356+
this.#session.readyState !== WebSocket.OPEN
356357
) {
357358
return { healthy: false, message: 'not connected to livekit' };
358359
}

0 commit comments

Comments
 (0)