Valks-Games / Unity-Transport-Layer-UDP-Model

Learning the new Unity Transport Layer
MIT License
3 stars 0 forks source link

Resetting event queue with pending events #11

Closed valkyrienyanko closed 4 years ago

valkyrienyanko commented 4 years ago

Steps to reproduce

  1. Start server
  2. Start client
  3. Connect client to server
  4. Observe client and server sending and receiving data every 1 seconds.
  5. Kick the client from the server console.
  6. Error gets spammed in console every 1 seconds until client times out.
Resetting event queue with pending events (Count=1, ConnectionID=0) Listening: 1
UnityEngine.Debug:LogError(Object)
Unity.Networking.Transport.NetworkLogger:DumpToConsole() (at Library/PackageCache/com.unity.transport@0.3.0-preview.6/Runtime/NetworkLogger.cs:55)
Unity.Networking.Transport.LogJob:Execute() (at Library/PackageCache/com.unity.transport@0.3.0-preview.6/Runtime/NetworkDriver.cs:585)
Unity.Jobs.JobStruct`1:Execute(LogJob&, IntPtr, IntPtr, JobRanges&, Int32)
Unity.Jobs.JobHandle:ScheduleBatchedJobsAndComplete(JobHandle&)
Unity.Jobs.JobHandle:Complete()
Server:Update() (at Assets/Workspace/Scripts/Server.cs:90)
valkyrienyanko commented 4 years ago

https://github.com/Unity-Technologies/multiplayer/issues/22

valkyrienyanko commented 4 years ago

Solved.

The following is a bad example of how to kick a connection.

connections[connectionID] = default(NetworkConnection);

The following is a good example of how to kick a connection.

connections[connectionID].Disconnect(Driver);