Build 0.18.0.0
This commit is contained in:
@@ -107,10 +107,25 @@ namespace Barotrauma.Networking
|
||||
return -1;
|
||||
}
|
||||
|
||||
//FIXME workaround for crash when closing the server under .NET 6.0, not sure if this is the proper way to fix it but it prevents it from crashing the client. - Markus
|
||||
#if NET6_0
|
||||
try
|
||||
{
|
||||
if (readTask.IsCompleted || readTask.Wait(100, readCancellationToken.Token))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
#else
|
||||
if (readTask.IsCompleted || readTask.Wait(timeOut))
|
||||
{
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (readTask.Status != TaskStatus.RanToCompletion)
|
||||
|
||||
Reference in New Issue
Block a user