- Home /
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 ?
Same issue here I believe. I have the client calling match$$anonymous$$aker.DropConnection() when they want to disconnect. Everything appears to be fine client side, the client is stopped and OnClientDisconnect gets called. The host however never registers that the client was dropped, and ins$$anonymous$$d hits errors: -Server client disconnect error:1 -OnDisconnectError error:6 Followed by -Failed to send internal buffer channel:1 bytesToSend:1386 -Send Error: WrongConnection channel:1 bytesToSend:1386
I have the same problem, if someone find a solution, please let me know. I stuck on my game development, trying to figure out this issue. Thanks.
Agree. I am facing the same problem too, and finding workaround path... Can we fire this issue to org?
Answer by bobmoff · Nov 03, 2016 at 11:21 AM
This issue is now resolved in 5.4.2p3 :)
Not sure what you mean, but if you are asking about how the Network$$anonymous$$anager works I suggest you read the documentation: https://docs.unity3d.com/$$anonymous$$anual/UNet$$anonymous$$anager.html
$$anonymous$$y questions and answer is a specific bug related to it.
I have 5.4.2f2 but still getting this error message whenever I try to log out from my client. Any suggestion about how to solve it?
You need to install the p3 patch. U have 5.4.2f2 which probably means final2. Upgrade to the 5.4.2p3 patch and it should be fixed.
I downloaded and Installed p4 but now getting "UNetWeaver error: parameter [$$anonymous$$essageBase] is of the type [UnityEngine.Networking.$$anonymous$$essageBase] is not a valid type, please make sure to use a valid type." error. Do I need to install p3 first and then p4 or its O$$anonymous$$?
Answer by TwistedSage · Nov 03, 2016 at 02:21 PM
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.
Not sure what you mean by "place it on a $$anonymous$$onoBehaviour". You need to make a custom class that inherit from Network$$anonymous$$anager and override the methods that you want to intercept.
Or am I not understanding your problem maybe?
Answer by pavan123 · Feb 16, 2017 at 01:57 PM
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.
Your answer
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
are client hosted servers limited by my 20 person ccu? 0 Answers
How can I implement Client-Side Prediction and Reconciliation? 1 Answer
UNET Discrete Server/Client. ClientRPC? Command? 3 Answers
When a client click a Canvas button, does the server receive the info? 2 Answers