Description
Description
When connection manager is receiving disconnection message, it uses TransportIdToClientIdMap and ClientIdToTransportIdMap to find the client and manage the disconnection.
However if the message is received twice, the client no more exists the second time in the maps. A warning is raised
[Netcode] Trying to get the NGO client ID map for the transport ID (4178184557) but did not find the map entry! Returning default transport ID value
But the default value "0" correspond to the server. As a consequence, the disconnection process is executed for the server
Reproduce Steps
The bug is easily reproductible using Facepunch, but should be reproductible in other cases
- Server is started
- A client try to connect
- Connection approval is called on server side
- Server decide to refuse the connexion
- Both the client and server are disconnected
Actual Outcome
Server is disconnected
Expected Outcome
A message adressed to a disconnected client should be ignored
Screenshots
Environment
- OS: Windows
- Unity Version: 2023.2.15f
- Netcode Version: 1.8.1
- Netcode Commit: ?
Additional Context
Discussion can be found here :
https://forum.unity.com/threads/ngo-facepunch-problem-when-approval-is-refused-for-a-client.1525018