Skip to content

TransportIdToClientId / ClientIdToTransportId returns 0 when a player fails to connect, causing removal of the host #3695

@edunad

Description

@edunad

Description

When a player fails to connect properly, the TransportIdToClientId method returns default (0), deleting the host

Actual Outcome

Removes the host when a player has a problem connecting.

Expected Outcome

To remove the failed connection, or if not found, skip it.

Screenshots

SteamNetworkingSocketsTransport - connection closed for 76561198011124655 state responce: k_ESteamNetworkingConnectionState_ProblemDetectedLocally

[Netcode] Trying to get the NGO client ID map for the transport ID (76561198011124655) but did not find the map entry! Returning default transport ID value.

[Netcode] Disconnect Event From 0

[NetworkSpawnManager][ChangeOwnership] Attempting to change ownership to Client-0 when the owner is already 0! (Ignoring)

[NetworkSpawnManager][ChangeOwnership] Attempting to change ownership to Client-0 when the owner is already 0! (Ignoring)

And keeps repeating...

Environment

  • OS: Windows 11
  • Unity Version: Unity 6.2 (6000.2.6f1)
  • Netcode Version: 2.0.0 (latest master)
  • Netcode Topology: P2P

Additional Context

I'm using steamnetwork as a transport.
Changing the return default to return ulong.MaxValue; instead fixes the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    stat:importedStatus - Issue is tracked internally at Unitytype:bugBug Report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions