mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Add extra try/catch cancellation ex
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user