Skip to content
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

Cannot access a disposed object (ShellStream) #917

Closed
PatrickSchmidtSE opened this issue Feb 14, 2022 · 2 comments · Fixed by #1322
Closed

Cannot access a disposed object (ShellStream) #917

PatrickSchmidtSE opened this issue Feb 14, 2022 · 2 comments · Fixed by #1322
Labels
Milestone

Comments

@PatrickSchmidtSE
Copy link

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?

@IgorMilavec
Copy link
Collaborator

I have created a discussion #926 for all ShellStream related issues.

@jwlondon98
Copy link

Any update on this? I can't seem to get past this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants