If SshClient.Disconnect() is called just after the connected server is no longer available an exception occurs. Looks like there is a race condition on calling Disconnect. Checks are made for a connection before a DisconnectMessage is sent to the server but the server could be disconnected in between the time that the connection check is done and the message is sent. I have a scenario where this can happen quite easily.
I understand that I could put a try catch around the SshClient.Disconnect call but it seems like the better place for the try catch would be in the session class where the disconnect message is being sent. If an exception is thrown during a disconnect it could just be ignored.
Comments: ** Comment from web user: winkledumpling **
I understand that I could put a try catch around the SshClient.Disconnect call but it seems like the better place for the try catch would be in the session class where the disconnect message is being sent. If an exception is thrown during a disconnect it could just be ignored.
Comments: ** Comment from web user: winkledumpling **
I believe this is the same issue as
https://sshnet.codeplex.com/workitem/1581