Skip to content

Server Incorrectly Closes Connections During Client ID Sync #88

@ezxfv

Description

@ezxfv

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions