Not sure if this is a bug or something that I am doing wrong, under normal conditions there is no problem.
I have been running a test where the client connects and sends around 1,000 small packets to attempt to flood the server. ( Just a simple NetworkTransport.Send() loop )
Even with the flooding everything is fine, up until I disconnect the client before all of the packets have been processed.
public void DisconnectUser(List<int> userList)
{
for (int i = 0; i < userList.Count; ++i)
{
byte error;
NetworkTransport.Disconnect(hostID, userList[i], out error);
cDictionary.Remove(userList[i]);
ErrorLog(error);
}
}
No problem with the disconnection, the client even receives it, the problem arrives on the next DataEvent
Assertion failed on expression: ‘0’
UnityEngine.Networking.NetworkTransport:ReceiveFromHost(Int32, Int32&, Int32&, Byte[ ], Int32, Int32&, Byte&)
I’ve been trying to figure this one out all day, but with no success
Has anyone else encountered this problem? or possibly have any ideas/suggestions? ![]()