Skip to content

SshOperationTimeoutException disposing stream for connection that was already terminated by server #335

Closed
@JasonQG

Description

@JasonQG

Since upgrading to 2016.1.0, I'm getting the below exception. Right before the stream was disposed, a command was sent to reboot the server, thus terminating the SSH connection on the server side. The same code worked with 2016.0.0.

System.AggregateException: One or more errors occurred. ---> Renci.SshNet.Common.SshOperationTimeoutException: Session operation has timed out
   at Renci.SshNet.Session.WaitOnHandle(WaitHandle waitHandle, TimeSpan timeout)
   at Renci.SshNet.Session.Renci.SshNet.ISession.WaitOnHandle(WaitHandle waitHandle)
   at Renci.SshNet.Channels.Channel.Close()
   at Renci.SshNet.Channels.ChannelSession.Close()
   at Renci.SshNet.Channels.Channel.Dispose(Boolean disposing)
   at Renci.SshNet.Channels.ClientChannel.Dispose(Boolean disposing)
   at Renci.SshNet.Channels.ChannelSession.Dispose(Boolean disposing)
   at Renci.SshNet.Channels.Channel.Dispose()
   at Renci.SshNet.ShellStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at System.IO.Stream.Dispose()

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions