Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server Incorrectly Closes Connections During Client ID Sync #88

Open
ezxfv opened this issue Dec 12, 2024 · 0 comments
Open

Server Incorrectly Closes Connections During Client ID Sync #88

ezxfv opened this issue Dec 12, 2024 · 0 comments

Comments

@ezxfv
Copy link

ezxfv commented Dec 12, 2024

When server initiates connection forwarding and a client with ID 101 performs sync connection, the server incorrectly closes all connections with IDs > 100 if the current max id in client reported clientIDs is 100, causing request failures.

When adding a connection to the Session, if s.client is true, use s.nextID to track the maximum received ID. During syncing, append the active connection IDs with append(s.activeConnectionIDs(), 0, s.nextID).
Since normal IDs are always greater than 0, the server can determine if the maximum value was reported by examining the second-to-last element of the ID list. This approach maintains compatibility with existing libraries.

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

No branches or pull requests

1 participant