aboutsummaryrefslogtreecommitdiffstats
path: root/cogs/vclogs.py
diff options
context:
space:
mode:
authorsalmonik <raisersoft@proton.me>2026-05-20 17:19:11 +0200
committersalmonik <raisersoft@proton.me>2026-05-20 17:19:11 +0200
commitf5af4c11645bb1ff3aa993fb9c3a29c4a01b40c3 (patch)
treee31e7449f5c49417a5d3f4c5bf9dffbf002205b2 /cogs/vclogs.py
parentFix stale-connection reconnect hang and TTS temp-file collision (diff)
downloadsenator-sperma-f5af4c11645bb1ff3aa993fb9c3a29c4a01b40c3.tar.gz
senator-sperma-f5af4c11645bb1ff3aa993fb9c3a29c4a01b40c3.zip
Fix zombie voice client after gateway restart
- play_tts: run is_voice_client_alive() check regardless of is_playing() state. After a gateway restart, is_playing() can return True on a dead client, which previously bypassed the stale-detection guard (was: 'if is_connected and not is_playing')
Diffstat (limited to '')
-rw-r--r--cogs/vclogs.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cogs/vclogs.py b/cogs/vclogs.py
index 01a428d..35826d4 100644
--- a/cogs/vclogs.py
+++ b/cogs/vclogs.py
@@ -129,7 +129,7 @@ class VcLogs(commands.Cog):
129 is_connected = voice_status[1] if voice_status else False 129 is_connected = voice_status[1] if voice_status else False
130 is_playing = voice_status[2] if voice_status else False 130 is_playing = voice_status[2] if voice_status else False
131 131
132 if is_connected and not is_playing: 132 if is_connected:
133 from cogs.voice import is_voice_client_alive 133 from cogs.voice import is_voice_client_alive
134 if not is_voice_client_alive(voice_client, channel.guild): 134 if not is_voice_client_alive(voice_client, channel.guild):
135 logger.warning("Stale voice client in play_tts, reconnecting") 135 logger.warning("Stale voice client in play_tts, reconnecting")