Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: How to deal with the error stream when using ShellStream

$
0
0
On second glance i found a bug in your code:
                if (shells.CanRead)
                    output = shells.ReadLine();
                match = regex.Match(output);
match.Success will never become true. ReadLine() blocks till a newline appears.
But the shell-prompt "user@host:~$" doesn't have one
=> endless blocking of Readline() and your loop would never exit.

Viewing all articles
Browse latest Browse all 1729

Latest Images

Trending Articles



Latest Images