Fix NetDriver to also work well in Linux.

This commit is contained in:
BDisp
2024-11-09 20:53:13 +00:00
parent 012d47e28f
commit 8c5832f8f1
3 changed files with 107 additions and 38 deletions

View File

@@ -756,7 +756,17 @@ internal class NetDriver : ConsoleDriver
_mainLoopDriver._netEvents._forceRead = true;
}
_waitAnsiResponse.Wait (_ansiResponseTokenSource.Token);
if (!_ansiResponseTokenSource.IsCancellationRequested)
{
lock (ansiRequest._responseLock)
{
_mainLoopDriver._waitForProbe.Set ();
_mainLoopDriver._netEvents._waitForStart.Set ();
}
_waitAnsiResponse.Wait (_ansiResponseTokenSource.Token);
}
}
catch (OperationCanceledException)
{