com.unity.netcode.gameobjects
com.unity.netcode.gameobjects copied to clipboard
Spammed With Client Disconnect
Describe the bug Spamming warning log printed in console after client disconnects. With the attempt to get the current observers of the network object, the same client id that disconnected is present. Even though its handled in the network manager script with the OnClientDisconnectFromServer method to remove the id from the observers. So now all of the objects. are spamming
Attempt to send to not connected connection {1}
Screenshots
Environment (please complete the following information): MLAPI 0.1
Additional context
var observers = netIdentity.GetObservers();
while (observers.MoveNext()) { ulong conn = observers.Current; if (conn != NetworkManager.Singleton.LocalClientId) { MemoryStream stream = new MemoryStream(); using (var writer = PooledNetworkWriter.Get(stream)) { // Send the message. This calls HandleSync on the receiving clients. state.Serialize(writer); CustomMessagingManager.SendNamedMessage("Method", conn, stream); } } }
Added to the bug backlog as MTT-1581
This issue was closed because it has been inactive for more than a year. If you still have issues or questions around the topic, we suggest asking on our discord.