From 8d35930871db37b1009275c423ce95ed72954613 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 20 May 2026 17:08:40 +0200 Subject: Fix stale-connection reconnect hang and TTS temp-file collision - _ensure_voice_client: call _remove_voice_client() when cleaning up stale or disconnected clients so the fresh connect doesn't hang for 30s waiting for Discord's stale state to clear - Reduce connect timeout from 30s to 10s for faster failure recovery - vclogs.py: use a unique temp filename per TTS call (include timestamp) instead of relying on PID alone, preventing concurrent TTS calls from clobbering each other's files --- cogs/vclogs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cogs/vclogs.py') diff --git a/cogs/vclogs.py b/cogs/vclogs.py index 2e853ad..01a428d 100644 --- a/cogs/vclogs.py +++ b/cogs/vclogs.py @@ -116,7 +116,7 @@ class VcLogs(commands.Cog): voice_mgr = self.get_voice_manager() temp_dir = get_temp_dir() - tts_file = os.path.join(temp_dir, f"temp_tts_{os.getpid()}.mp3") + tts_file = os.path.join(temp_dir, f"temp_tts_{os.getpid()}_{asyncio.get_event_loop().time()}.mp3") tts = gTTS(text=text, lang='pl') logger.info("saving file") -- cgit v1.2.3