NetworkManager.OnServerDisconnect not called on timeout in Unity 5.4.1+

Have been relying on OnServerDisconnect during the development on 5.4 so far to know when a player is disconnected, but after upgrading to 5.4.1 (and also tried 5.4.2 which seem to be pulled back now) this method is not called any more.

Instead I get an error message:

Server event: host=0 event=DisconnectEvent error=6
Server client disconnect error:1
OnDisconnectError error:6

Which seems to come from NetworkServerSimple or something. I dont know how to get this callback or register delegate or similar.

There is no OnServerError callback either, so I am bit confused. Is this a bug, or is there another way to know when the client disconnects ?

This issue is now resolved in 5.4.2p3 :slight_smile:

I know how its supposed to work. Manuel says just place it in a MonoBehavior class and drop it on any gameobject. But its never called that way.

Hi,I am having issue when using matchmaker whereby my client kicked off the server approximately 50sec and every time got an error :

Server client disconnect error:1
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()
OnDisconnectError error:6
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()

when i upgraded to 5.4.2p3 version i got the below error:

Server Disconnected due to error: Timeout
UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate().
Could anyone help me to figure out this issue.