Skip to content

fix: Don't keep bad packets in the adapter's send queues #1648

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

Merged
merged 6 commits into from
Feb 10, 2022

Conversation

simon-lemay-unity
Copy link
Contributor

MTT-2408 (also related to MTT-2329)

When sending a message caused an error, we would keep that message in the adapter's send queue. That's the correct behavior when the error is for a UTP send queue overflow (we want to retry sending later), but it's wrong for all other types of errors, since these are not recoverable (you can't just wait them out). This would cause the error message to be spammed endlessly on each update as the adapter tried to resend the packet.

The fix is simply to remove the packet from the adapter's send queue on non-overflow errors.

Changelog

com.unity.netcode.adapter.utp

  • Fixed: Fixed an issue where packets causing errors would not be removed from the send queue, which would cause the error message to be spammed on every frame as the adapter would try to resend the packet.

Testing and Documentation

  • No tests have been added.
  • No documentation changes or additions were necessary.

@NoelStephensUnity NoelStephensUnity merged commit 79f66b0 into develop Feb 10, 2022
@NoelStephensUnity NoelStephensUnity deleted the fix/wrong-packets-in-queue branch February 10, 2022 20:48
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

Successfully merging this pull request may close these issues.

4 participants