This commit is contained in:
CortexCore
2024-06-12 17:57:35 +08:00
parent b3996f7bf3
commit ceea55b67a
2 changed files with 19 additions and 5 deletions

View File

@@ -439,10 +439,12 @@ namespace BITKit.Net
public void Tick()
{
while (commandQueue.TryDequeue(out var bytes))
try
{
client.Send(bytes, KcpChannel.Reliable);
}
while (commandQueue.TryDequeue(out var bytes))
{
client.Send(bytes, KcpChannel.Reliable);
}
#if UNITY_EDITOR
if (_pingInterval.AllowUpdate)
@@ -452,7 +454,12 @@ namespace BITKit.Net
}
#endif
client.Tick();
client.Tick();
}
catch (Exception e)
{
BIT4Log.LogException(e);
}
}