Skip to content

Shellstream is disposed when receiving huge response #1762

@katomark

Description

@katomark

Hi Guys,

Need your help to resolve my issue.
I send a ssh command to my router "show bgp nei xxx advertised-route", the response is huge and need more than 15 minutes to complete.
If I save the response, the size is 600Mb.

The problem occur when I send the second command, it was said that the shellstream is disposed while my ssh connection is still open.

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Renci.SshNet.ShellStream'.
at Renci.SshNet.ShellStream.Write(String text)
at esihaur.SSH.SSHJob.WriteToStream(String command)

void WriteToStream(string command) { if (isConnected) { ca_Shell.Write(command); ca_Shell.Flush(); } }

public bool isConnected { get { return (ca_client != null && ca_client.IsConnected); } }

Please share guys if any solution

Thank You

Regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions