-
Notifications
You must be signed in to change notification settings - Fork 450
fix: Clear adapter send queues on client disconnection #1649
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
fix: Clear adapter send queues on client disconnection #1649
Conversation
@simon-lemay-unity Take a look at #1653, I think some develop transport PRs didn't make it into the v1.0.0 branch, but I did have better success with some of the modifications I made up to the point I realized all of those tests are #IF'd out in develop with a todo note about getting them working on consoles. It is the same timing issue come back to haunt you! :) |
Yeah, I may have not been as diligent backporting PRs when they only impacted tests. Thanks for bringing the changes in 1.1.0. Regarding the tests being defined out for consoles, the reason is that at the time we didn't run UTP tests on these platforms. It was deemed a bit useless to investigate adapter test failures when we didn't even know if UTP itself was working correctly on consoles. Now that we know it does, we can get back to enabling these tests and investigating the failures (it's a task in our current sprint). |
* Bring over some changes from PR #1649 * Add test for server disconnect after client disconnect * Improve stability of connection tests * Fix handling of Disconnect events * Add CHANGELOG entry * Add PR number to CHANGELOG entry
…ub.com/Unity-Technologies/com.unity.netcode.gameobjects into fix/clear-send-queue-client-disconnect
Likeliest cause of MTT-2329.
When the server disconnected a client, it would clear the send queues related to that client. But the reverse was not done. When the client disconnected from the server, it would not clear its send queues. If there was data in there, the adapter would attempt to send it on its next update (or if properly shut down, it would try to send it the next time a connection was made using the same client ID).
The fix is simply to apply the same logic when client disconnects as when server disconnects.
Changelog
com.unity.netcode.adapter.utp
Testing and Documentation