Skip to content

Conversation

simon-lemay-unity
Copy link
Contributor

For reasons unknown, UTP's maximum frame time was configured to 100ms in the editor or development builds (instead of its default value of 0 which disables this feature). The maximum frame time makes it so that UTP will believe that no longer than the given time has elapsed between two updates.

That could be problematic if for some reason UTP is updated very infrequently. Say if it's only updated every second, then over five updates it will only consider that 500ms have elapsed, whereas the real time elapsed would be 5 seconds. That could make UTP miss sending heartbeats frequently enough to keep connections alive (which could lead to allocation timeouts if using Relay, for example).

I see no reason to keep this behavior in NGO, hence this PR is removing it.

Changelog

N/A (Not sure I'm actually fixing a real issue, or if it's just a theoretical possibility.)

Testing and Documentation

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

@simon-lemay-unity simon-lemay-unity requested a review from a team as a code owner July 28, 2022 21:27
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@simon-lemay-unity simon-lemay-unity enabled auto-merge (squash) August 17, 2022 20:29
@simon-lemay-unity simon-lemay-unity merged commit bc4f538 into develop Aug 17, 2022
@simon-lemay-unity simon-lemay-unity deleted the fix/no-max-frame-time branch August 17, 2022 23:03
jakobbbb pushed a commit to GooseGirlGames/com.unity.netcode.gameobjects that referenced this pull request Feb 22, 2023
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.

5 participants