Skip to content

Conversation

@NoelStephensUnity
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity commented Nov 14, 2025

Purpose of this PR

This fix prevents the warning message from being logged on the client side when shutting down from the client side and the developer log level is set.

This fix also assures that a server or host does not send itself a disconnect message.

This fix separated the transport id clean up between client and host/server upon handling a disconnect event which assures the server/host will have access to this transport id when processing a client that disconnected.

Jira ticket

MTTB-1739

Changelog

  • Fixed: Issue where a warning message was being logged upon a client disconnecting from a server when the log level is set to developer.
  • Fixed: Issue where the server or host would no longer have access to the transport id to client id table when processing a transport level client disconnect event.

Documentation

  • No documentation changes or additions were necessary.

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

Functional Testing

Manual testing :

Replication Project

image

Validating the Fix

  • Open the project.
  • Start at least 1 MPPM virtual client.
  • Enter play mode.
  • Once the client is connected:
    • (for simplicity) Clear both the editor and virtual client logs.
    • Click the Disconnect button on the client side.
      • No warnings should be logged
      • image
    • Click the Shutdown button on the host side.
      • No warnings should be logged
      • image

Replicating the issue

  • Switch to an earlier version of NGO (i.e. v2.7.0) via package manager--> add package by name
    • Name: com.unity.netcode.gameobjects
    • Version: 2.7.0
  • Repeat the above steps
    • Clicking Disconnect on the client side should generate a warning log on the client and two on the host.
    • image

Automated tests:

  • Covered by existing automated tests
  • Covered by new automated tests (wip)

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

This is a v2.x only issue.

This fix prevents the warning message from being logged on the client side when shutting down from the client side and the developer log level is set.
This fix also assures that a server or host does not send itself a disconnect message.
This fix separated the transport id clean up between client and host/server upon handling a disconnect event which assures the server/host will have access to this transport id when processing a client that disconnected.
Adding change log entries.
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.

2 participants