Skip to content

fix: discord gateway protocol requires a heartbeat#938

Open
hello-world-bfree wants to merge 1 commit intoRightNow-AI:mainfrom
hello-world-bfree:feat/discord-heartbeat
Open

fix: discord gateway protocol requires a heartbeat#938
hello-world-bfree wants to merge 1 commit intoRightNow-AI:mainfrom
hello-world-bfree:feat/discord-heartbeat

Conversation

@hello-world-bfree
Copy link
Copy Markdown

Summary

Fixes #937

Implements a heartbeat for Discord

Changes

Adds a tokio::time::interval tick to the main select! loop that sends a heartbeat with the current sequence number. The interval starts at a 45 second default and gets re-calibrated to the server-specified heartbeat_interval once the HELLO payload arrives.

Testing

  • cargo clippy --workspace --all-targets -- -D warnings passes
  • cargo test --workspace passes
  • Live integration tested (if applicable)

Security

  • No new unsafe code
  • No secrets or API keys in diff
  • User input validated at boundaries

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.

Discord channel requires a heartbeat

1 participant