Skip to content

Conversation

@noellie-velez
Copy link
Collaborator

@noellie-velez noellie-velez commented Dec 5, 2025

Purpose of this PR

Jira ticket

MTTB-1671
fixes: #3717

Changelog

  • Fixed: avoid maxCapacity calculation overflow if a developer sets a very, very high (large) m_DisconnectTimeoutMS in the Editor for Unity Transport.

Documentation

  • No documentation changes or additions were necessary.

Testing & QA (How your changes can be verified during release Playtest)

Functional Testing

Manual testing :

  • Manual testing done

Automated tests:

  • Covered by existing automated tests
  • Covered by new automated tests

Does the change require QA team to:

  • Review automated tests?
  • Execute manual tests?
  • Provide feedback about the PR?

If any boxes above are checked the QA team will be automatically added as a PR reviewer.

Backports

@noellie-velez noellie-velez changed the title Fix/cap maximum disconnect timeout fix: cap maximum disconnect timeout Dec 5, 2025
@noellie-velez noellie-velez marked this pull request as ready for review December 5, 2025 18:40
@noellie-velez noellie-velez requested a review from a team as a code owner December 5, 2025 18:40
@simon-lemay-unity
Copy link
Contributor

A more appropriate way to check for overflow would be to use a checked statement.

Also while we're modifying that code, we might as well handle the case of the disconnect timeout being 0. In newer versions of UTP, this is now valid and will disable the timeout entirely (which I guess is what users were trying to achieve by setting it very high to begin with). Setting it to the maximum maximum value in that situation makes sense.

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.

Integer overflow for maxCapacity calculation from large m_DisconnectTimeoutMS

4 participants