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

slotId in packet may cause issues in reliable relayed connection #312

Open
staszek-krotki opened this issue Sep 7, 2023 · 1 comment
Open
Assignees

Comments

@staszek-krotki
Copy link
Contributor

When Node1 initiates a reliable, relayed connection with Node2 it remembers its slot on the server. When Node2 disconnects from the server then server marks its session as Purgatory in that slot and once the same Node2 initializes a new session it will be put into a new slot. If, after Node2 established a new session, Node1 would want to send something to Node2 it will try to use the previous slot number. Server will send back a disconnected message but smoltcp will try to re-transmit the same packet as is (meaning with the old slot Id in the header). And it will do so infinitely.

@staszek-krotki staszek-krotki self-assigned this Sep 13, 2023
@staszek-krotki
Copy link
Contributor Author

Server checks if the slot is in Purgatory state and if it is then tries to find if any other session has been established with the same nodeId - if yes then sends the packet to that slot instead.

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