Closed ghost closed 7 years ago
Hi AndriusGergelis
Could you give me a little more information about the setup?
Ran client and server on different peers and called StopClient() on peer which had ClientEnabled flag set to true. I start client by calling InitializeAsClient(address). Setting log levels to "Trace" did not produce any valuable info. Attached a simple project, with which I was able to reproduce the issue. disonance-test.zip
Thanks for the project, I can confirm that reproduces the problem. I'm looking into it now :)
Thank you for such a fast response. Would really appreciate a workaround or a fix as soon as possible, the deadline is very near :D
I actually already identified (at least part of) the problem although I don't have a proposed fix/workaround for it yet.
Line 59 of UNetServer.cs is:
case NetworkEventType.DisconnectEvent:
ClientDisconnected(senderConnectionId);
This tells the server that the given client has disconnected and the server cleans up it's internal datastructures to remove all reference to that client. This event never happens! This is particularly odd because it's part of UNet which invokes that event...
Hello again.
We've got a workaround for this problem. Simply add this code into UNetClient.cs:
public override void Disconnect()
{
base.Disconnect();
byte error;
NetworkTransport.Disconnect(_socket, _connection, out error);
if (error != (int) NetworkError.Ok)
Log.Error("Failed to cleanly disconnect from Dissonance server at {0}:{1}, Error {2}", _network.ServerAddress, _network.Port, (NetworkError) error);
}
If that resolves the problem, please close this issue.
It did resolved it, thank you very much. Glad we bought this asset.
Hello,
I'm currently using Unity 5.5.0f3 and Dissonance 1.0.3, and ran into an issue: