Add extra try/catch cancellation ex

This commit is contained in:
tznind
2024-10-28 19:48:01 +00:00
parent 9aff49179f
commit 2b7d0c7f70

View File

@@ -179,10 +179,18 @@ internal class NetEvents : IDisposable
{
_winChange.Set ();
if (_inputQueue.TryTake (out var item,-1,_netEventsDisposed.Token))
try
{
return item;
if (_inputQueue.TryTake (out var item, -1, _netEventsDisposed.Token))
{
return item;
}
}
catch (OperationCanceledException)
{
return null;
}
}
return null;