Client Disconnect Due to Timeout Is Not Logged
Description
When ever a client times out due to inactivity, no special information is sent to the console to distinguish it from other types of disconnects. This occurs even if the NetworkManagers LogLevel is set to 'Developer'.
Reproduce Steps
- Setup a Multiplayer Scene or Project
- Set 'Heartbeat Timeout MS' to a value higher than 'Disconnect Timeout MS'
- Build or Run project on a server and a client
- Await for at least 'Disconnect Timeout MS' in time with no messages being sent between the client and server.
Actual Outcome
Client is disconnected with a generic message, specifically [Netcode] Disconnect Event From 0
Expected Outcome
Some kind of error message that is useful to determining why a client disconnected (For example: Client Timed Out).
Screenshots
Sample Config:

Environment
- OS: Windows 10
- Unity Version: 2021.3.12f1
- Netcode Version: 1.2.0
Additional Context
This, combined with the DisconnectReason being empty bug, makes debugging the cause of certain client disconnect events near impossible.
In addition, I would consider adding some validation to the UnityTransport editor to ensure that the heartbeat is lower than the disconnect timeout
@Reag If you set your LogLevel to Developer in the NetworkManager you should get a console log output. However, I am noticing that it only logs locally so we could make an adjustment so it generates a network server log that will log the message to the console locally and if the instance is not the server it will send the message to the server and generate a console log there as well.
Even when set to Developer, the message is still just [Netcode] Disconnect Event From 0. This makes is impossible to diagnose the reason for the disconnect.
Necroing to say still happening in Unity 6000.0.23f1
We are seeing similar issues in distributed authority. The client will disconnect unexpectedly with the message [Netcode] Disconnect Event From 0
Is there any way to debug these disconnects?
#3551 is in progress to allow better debugging of disconnect events.
Closing this issue as #3551 is being merged shortly and will be in the next update (after v2.6.0).