-
-
Notifications
You must be signed in to change notification settings - Fork 933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ShellStream.Expect TimeSpan timeout, not working. #714
Comments
I ended up, just threading off the writeline / expect then handled the timer with an EventWaitHandle. |
I have created a discussion #926 for all ShellStream related issues. |
@gavin1970 at this time the implementation resets the timeout after each byte received. This is definitely something we need to look into. |
@IgorMilavec I'm using it in https://github.com/biocoder-frodo/VPNCenter.OpenVPN.PackageConfig and https://github.com/biocoder-frodo/SynoDuplicateFolders to be able to do an interactive sudo command inside an SSH session. I quickly realised that the Regex should be really simple. If you constrain the expression too much, you have no or not enough guarantees that the incoming network stream will deliver the text in the chunk(s) that you need for the Regex to match. |
This issue has been fixed in the 2024.0.0 version. |
Microsoft Visual Studio Professional 2019 Version 16.6.5
.NET Framework 4.7.2
SSN.NET v2016.1.0
I'm using the latest SSH.NET with ShellStream and when calling the Expect(Regex, TimeSpan) the timeout doesn't seem to work at all. I've also tried using TimeSpan.FromSeconds(30) with the same results. If the expected information comes back, it works fine.
The text was updated successfully, but these errors were encountered: