1
This commit is contained in:
@@ -123,6 +123,11 @@ namespace BITKit.Net
|
|||||||
client.Tick();
|
client.Tick();
|
||||||
await Task.Delay(100);
|
await Task.Delay(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (client.connected is false)
|
||||||
|
{
|
||||||
|
OnConnectedFailed?.Invoke();
|
||||||
|
}
|
||||||
return client.connected;
|
return client.connected;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
@@ -367,7 +372,8 @@ namespace BITKit.Net
|
|||||||
}
|
}
|
||||||
return value.As<T>();
|
return value.As<T>();
|
||||||
}
|
}
|
||||||
await Task.Delay(100);
|
|
||||||
|
await UniTask.Yield();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -371,8 +371,8 @@ namespace BITKit.Net
|
|||||||
var startTime = DateTime.Now;
|
var startTime = DateTime.Now;
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
if(DateTime.Now-startTime>TimeSpan.FromSeconds(5) || server.connections.ContainsKey(id) is false)
|
if(DateTime.Now-startTime>TimeSpan.FromSeconds(5))
|
||||||
throw new TimeoutException();
|
throw new TimeoutException($"等待超时,Id:{id},时间{DateTime.Now-startTime}");
|
||||||
|
|
||||||
if (_p2p.TryRemove(index, out var value))
|
if (_p2p.TryRemove(index, out var value))
|
||||||
{
|
{
|
||||||
@@ -382,7 +382,8 @@ namespace BITKit.Net
|
|||||||
}
|
}
|
||||||
return (T)value;
|
return (T)value;
|
||||||
}
|
}
|
||||||
await Task.Delay(100);
|
|
||||||
|
await UniTask.Yield();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -187,7 +187,6 @@ namespace BITKit.Net.Kcp
|
|||||||
Singleton = this;
|
Singleton = this;
|
||||||
client = new KcpNetClient();
|
client = new KcpNetClient();
|
||||||
client.OnConnectedFailed += Reconnect;
|
client.OnConnectedFailed += Reconnect;
|
||||||
client.OnDisconnected += Reconnect;
|
|
||||||
}
|
}
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
@@ -187,7 +187,7 @@ namespace BITKit.UX
|
|||||||
if (panelsLabel is null || currentPanelLabel is null || historyLabel is null) return;
|
if (panelsLabel is null || currentPanelLabel is null || historyLabel is null) return;
|
||||||
panelsLabel.text=string.Join("\n",UXService.Panels);
|
panelsLabel.text=string.Join("\n",UXService.Panels);
|
||||||
currentPanelLabel.text = string.Join("\n",UXService.CurrentPanel?.Index);
|
currentPanelLabel.text = string.Join("\n",UXService.CurrentPanel?.Index);
|
||||||
historyLabel.text = string.Join("\n",UXService.History.Select(x=>x.Index));
|
historyLabel.text = string.Join("\n",UXService.History.Select(x=>x is null ? "Null" : x.Index));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -189,8 +189,7 @@ namespace BITKit.GameEditor
|
|||||||
Debug.LogException(e);
|
Debug.LogException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
protected virtual void RebuildList()
|
||||||
protected void RebuildList()
|
|
||||||
{
|
{
|
||||||
List.Clear();
|
List.Clear();
|
||||||
var paths = AssetDatabase.FindAssets($"t:{typeof(T).Name}");
|
var paths = AssetDatabase.FindAssets($"t:{typeof(T).Name}");
|
||||||
|
Reference in New Issue
Block a user