Skip to content

Conversation

@KrakenTyio
Copy link

restore messages contain actual entry ID to correct client offset

#39
socketio/socket.io#5419

restore messages contain actual entry ID to correct client offset
Copilot AI review requested due to automatic review settings November 21, 2025 09:03
Copilot finished reviewing on behalf of KrakenTyio November 21, 2025 09:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modifies the restoreSession method to append the Redis stream entry ID to each missed packet during connection state recovery. This ensures that clients receive the actual entry ID needed to correctly track their offset position in the event stream, addressing issues with offset synchronization during reconnection.

Key Changes:

  • Clones packet data using slice() before modification to avoid mutating the original data
  • Appends the Redis stream entry ID to each missed packet

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@KrakenTyio KrakenTyio closed this Nov 21, 2025
@KrakenTyio KrakenTyio reopened this Nov 21, 2025
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