-
Notifications
You must be signed in to change notification settings - Fork 17
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
[Bug]: Gracefully handle relogs and timeouts (possible mishandling of sessions/connections?) #52
Comments
We have previously removed the timeout DISCONNECT packets, but I think these could help when debugging this type of issues, so that we can catch relogs on network dumps easily and prevent confusion with other network issues from the user The |
I agree with reimplementing these. But I don't think they will fix all the issues. Pablo has mentioned that Mario Kart 7 does not handle these kinds of packets from the server the same way other games do, so it may be somewhat unreliable to lean on Also it seems like timeouts just aren't happening correctly in general? Sending the
But according to dumps from Imora, the server seems to still be trying to send the client |
Note that even after #76 there is still some source of connections that aren't removed from the Connections map, though these new ones seem genuinely harmless outside the leaked memory and slower map lookups |
(Minecraft: Wii U edition has 446 entries in its Connections map after 3 days of uptime) |
I believe the missing stalled connections would be from clients from which a |
Checked Existing
What happened?
Currently when a user logs in and out there is a chance for the server to treat the client as still connected. This can be seen in Imora's network dumps, where the console relogs quickly and packets from the server are still being sent.
What did you expect to happen?
The server should probably have a better timeout mechanism for this? I'm unsure how to acomplish this though. We did not see these kinds of issues in Imora's dumps when he used Nintendo Network, so clearly they're doing something better.
#48 may also help here? Relogs won't matter if we just reset the client state whenever a new
SYN
is sent.However we may also need to change how we handle sessions? Looking back over the code, it seems like this is half-baked.
PRUDPConnection
represents a single PRUDP connection, and has a reference toSocketConnection
.SocketConnection
represents a physical socket connection (UDP or WebSocket), and has a reference to all the PRUDP connections attached to it. However I can't seem to find a place where we actually set thePRUDPConnection
on theSocketConnection
?SocketConnection.Connections
comment says:However when this is used in
PRUDPConnection.cleanup
the connections session ID is used?This seems very wrong, and is at least partially to blame for some issues. We seem to be mishandling sessions/connections here.
Steps to reproduce? (OPTIONAL)
No response
Any other details to share? (OPTIONAL)
No response
The text was updated successfully, but these errors were encountered: