services: fix TTS websocket services disconnections

Fixes #1467
This commit is contained in:
Aleix Conchillo Flaqué
2025-04-17 11:29:49 -07:00
parent f6f01ea7e4
commit 497d48b6c8
9 changed files with 42 additions and 34 deletions

View File

@@ -31,7 +31,7 @@ class WebsocketService(ABC):
bool: True if connection is verified working, False otherwise
"""
try:
if not self._websocket:
if not self._websocket or self._websocket.closed:
return False
await self._websocket.ping()
return True