SSH.NET Peek() hangs (wodSSH / wodSSH.NET)
Hello,
I am using the following function to test for connectivity before using the client to access a remote computer. Connections are stored in a pool until ready to be used. When I run the app at normal speed, the Peek() call hangs. When I run in debug mode, stepping through the code, Peek() appears to execute normally. Can you explain what might be going on here? We just upgraded to v2.6.6 of the client. Previously, we were using v2.5.3 but this did not seem to happen. Have there been any issues with Peek()? Does this seem like a sensible use of the method?
Protocol = SSHAuto
Blocking = true
Timeout = 0
Here is the function that calls Peek():
public override void ProofOfLife()
{
if (m_ssh != null)
{
try
{
if (m_ssh.State != SSH.States.Connected)
{
throw new Exception("ProofOfLife: SSH client is not connected.");
}
m_ssh.Peek(); // hangs here when run at normal speed
}
catch
{
throw;
}
finally
{
}
}
else
{
throw new Exception("ProofOfLife: SSH client is null");
}
}
Complete thread:
- SSH.NET Peek() hangs - Tony, 2017-02-22, 21:23
- SSH.NET Peek() hangs - Jasmine, 2017-02-22, 21:52
- SSH.NET Peek() hangs - Tony, 2017-02-23, 02:05
- SSH.NET Peek() hangs - Jasmine, 2017-02-23, 22:04
- SSH.NET Peek() hangs - Tony, 2017-02-24, 01:22
- SSH.NET Peek() hangs - Jasmine, 2017-02-23, 22:04
- SSH.NET Peek() hangs - Tony, 2017-02-23, 02:05
- SSH.NET Peek() hangs - Jasmine, 2017-02-22, 21:52