Skip to content

Cannot access a disposed object (ShellStream) #917

Description

@PatrickSchmidtSE

I have this weird behaviour , only happening with one device ( and only once a day).

"Cannot access a disposed object (ShellStream)"
at Renci.SshNet.ShellStream.Write(String text)

What struggles me is that IsConnected is showing true AND no errorOccured Event was thrown ( so i know the connection was suddenly interupted).

i use just this:
SshCommand cmdRes = client.RunCommand(cmd);

ShellStream is created via this call
stream = client.CreateShellStream("dumb", 10000, 24, 800, 10000, 4086);

The dispose must happen inside the Renci part. The question is, how to find out why the ShellStream is disposed.
And if i get this error, how can i react? Just create a new ShellStream and re-run the command?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions