Skip to content

fix: voice UDP causes main gateway to stop acking heartbeats#439

Open
Droid00000 wants to merge 1 commit into
shardlab:mainfrom
Droid00000:fix/properly-disconnect-voice-gateway
Open

fix: voice UDP causes main gateway to stop acking heartbeats#439
Droid00000 wants to merge 1 commit into
shardlab:mainfrom
Droid00000:fix/properly-disconnect-voice-gateway

Conversation

@Droid00000
Copy link
Copy Markdown
Collaborator

Summary

A while ago, I got an issue where after connecting to the VWS failed, the the VWS would not properly close and still attempted to send heartbeats. Additionally, because @socket.recv(74) reads from a socket and blocks, and we have other threads, this would cause the main Gateway thread to somehow stop receiving data too, because after the failed voice connection attempt, my bot wouldn't respond to any slash commands, and eventually I'd see a debug message stating that the last heartbeat was not acked, and then the code would just indefinitely hang. After much fucking around, adding a timeout to the #receive_discovery_reply seems to fix this, and none of the problems above seem to be an issue.

@Droid00000 Droid00000 requested a review from swarley March 15, 2026 07:24
@Droid00000 Droid00000 changed the title fix: voice UDP causes main Gateway to stop acking heartbeats fix: voice UDP causes main gateway to stop acking heartbeats Mar 15, 2026
@Droid00000 Droid00000 force-pushed the fix/properly-disconnect-voice-gateway branch from 5321855 to f22fa4e Compare March 15, 2026 07:28
@Droid00000 Droid00000 force-pushed the fix/properly-disconnect-voice-gateway branch from 4cf75cd to a16ea22 Compare March 15, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant