From ba430cc65b2823a08a1fca1c9bfca593d71c4e69 Mon Sep 17 00:00:00 2001 From: Greg Mousseau Date: Sat, 28 Feb 2026 14:37:36 -0500 Subject: [PATCH] fix(android): drainingTts identity check, mark stopped on WebSocket failure - Codex P2: drain coroutine now only clears drainingTts if it's the same instance (=== check), preventing a newer drain from being unreachable by stopTts. - Codex P2: set stopped=true on WebSocket onFailure so subsequent sendText calls are rejected and stale state doesn't persist. --- .../java/ai/openclaw/android/voice/ElevenLabsStreamingTts.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/android/app/src/main/java/ai/openclaw/android/voice/ElevenLabsStreamingTts.kt b/apps/android/app/src/main/java/ai/openclaw/android/voice/ElevenLabsStreamingTts.kt index 9d4d5abf52c..0cbe669409b 100644 --- a/apps/android/app/src/main/java/ai/openclaw/android/voice/ElevenLabsStreamingTts.kt +++ b/apps/android/app/src/main/java/ai/openclaw/android/voice/ElevenLabsStreamingTts.kt @@ -178,6 +178,7 @@ class ElevenLabsStreamingTts( override fun onFailure(webSocket: WebSocket, t: Throwable, response: Response?) { Log.e(TAG, "WebSocket error: ${t.message}") + stopped = true cleanup() }