Skip to content

Add reconnection support to GatewayClient#6

Merged
ncoop57 merged 2 commits intomainfrom
reconnect
Apr 9, 2026
Merged

Add reconnection support to GatewayClient#6
ncoop57 merged 2 commits intomainfrom
reconnect

Conversation

@ncoop57
Copy link
Copy Markdown
Contributor

@ncoop57 ncoop57 commented Apr 9, 2026

Implements automatic reconnection handling for the Discord gateway connection with session
resumption.

Changes:

  • Added method to handle connection drops and resume sessions
  • Implemented heartbeat ACK tracking to detect zombie connections
  • Added handling for Discord opcodes 7 (reconnect), 11 (heartbeat ACK), and 1 (heartbeat request)
  • Added class method for session resumption
  • Improved error handling in and methods
  • Store from ready event for proper reconnection

This ensures the bot maintains its session and doesn't miss events during temporary network issues.

@ncoop57 ncoop57 added the enhancement New feature or request label Apr 9, 2026
@ncoop57 ncoop57 merged commit 7ffb878 into main Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant