aboutsummaryrefslogtreecommitdiffstats
path: root/build.rs
diff options
context:
space:
mode:
authorsalmonik <raisersoft@proton.me>2026-05-21 16:45:31 +0200
committersalmonik <raisersoft@proton.me>2026-05-21 16:45:31 +0200
commit35545e30303faa517a98ec18c660e5f6c063c912 (patch)
tree36f5cf41b1dd1cf34f377804f20b76a462fcd219 /build.rs
parentmake the assistant simpler (diff)
downloadsenator-sperma-35545e30303faa517a98ec18c660e5f6c063c912.tar.gz
senator-sperma-35545e30303faa517a98ec18c660e5f6c063c912.zip
Fix voice reconnect race: reuse VoiceClient instead of destroying it
The stale-connection path was calling _remove_voice_client() then creating a brand-new VoiceClient via channel.connect(). This created a race: VOICE_SERVER_UPDATE (triggered by Discord when the user joins voice) arrives between the destroy and the fresh-connect, gets consumed by the old client, and the new client never receives it — causing a 10s timeout waiting for got_both_voice_updates. Fix: after disconnect(), call vc.connect() on the same VoiceClient instance. The disconnect resets the state machine to 'disconnected' but the same VoiceConnectionState processes any events that arrive between disconnect and reconnect, so the state machine correctly reaches got_both_voice_updates.
Diffstat (limited to 'build.rs')
0 files changed, 0 insertions, 0 deletions