1
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@@ -61,8 +61,15 @@ namespace BITKit.Net
|
||||
|
||||
private void Tick(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
if (server.IsActive() is false || ManualTick) return;
|
||||
try
|
||||
{
|
||||
if (server.IsActive() is false || ManualTick) return;
|
||||
server.Tick();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
BIT4Log.LogException(exception);
|
||||
}
|
||||
}
|
||||
|
||||
public void StartServer(ushort port = 27014)
|
||||
|
Reference in New Issue
Block a user