1
This commit is contained in:
@@ -371,8 +371,8 @@ namespace BITKit.Net
|
||||
var startTime = DateTime.Now;
|
||||
while (true)
|
||||
{
|
||||
if(DateTime.Now-startTime>TimeSpan.FromSeconds(5) || server.connections.ContainsKey(id) is false)
|
||||
throw new TimeoutException();
|
||||
if(DateTime.Now-startTime>TimeSpan.FromSeconds(5))
|
||||
throw new TimeoutException($"等待超时,Id:{id},时间{DateTime.Now-startTime}");
|
||||
|
||||
if (_p2p.TryRemove(index, out var value))
|
||||
{
|
||||
@@ -382,7 +382,8 @@ namespace BITKit.Net
|
||||
}
|
||||
return (T)value;
|
||||
}
|
||||
await Task.Delay(100);
|
||||
|
||||
await UniTask.Yield();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user