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

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>