Network.Disconnect() Get Crash Client

I have a problem with this function,

When i close client and get this code that will crash:

void OnDisconnectedFromServer (NetworkDisconnection info) {
     if(Network.isServer){
	Network.Disconnect();
        MasterServer.UnregisterHost();
	Debug.Log("Local Server Close Connection");
     }
}

i have try to put a button where i click and disconnect but same i get freeze client and crash.

that is a unity problem and i need to ask them? or i wrong somwthing?

It doesn’t make much sense to call Network.Disconnect in OnDisconnectedFromServer since this callback is called when you have been disconnected. Additionally the server can’t really be disconnected from the server since he is the server. However it might be possible that the callback is called on the server as well and your Network.Disconnect call send Unity in an endless recursion.

I replicated the crash myself.

As Bunny83 suggested, if you put:

void OnDisconnectedFromServer()
{
    Network.Disconnect();  //NOOOooooo!!
}

It seems to put Unity into an infinite loop (stack overflow).
Almost certainly Network.Disconnect() calls OnDisconnectedFromServer() internally.