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

New Post: "Queue Empty" after stream.Expect

$
0
0

stream.Expect(new Renci.SshNet.ExpectAction("done\r\n",
                            (rS1a) =>
                            {
                                writeToLog(rS1a);
                                writeToLog(row.field.ToString() + " sent");
                            })
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)   
at System.Collections.Generic.Queue`1.Dequeue()   
at Renci.SshNet.ShellStream.Expect(TimeSpan timeout, ExpectAction[] expectActions)   
at Renci.SshNet.ShellStream.Expect(ExpectAction[] expectActions)   
at HDTestWinForm.Form1.<>c__DisplayClassf.<method>b__a(String rS1) in Form1.cs:line 287   
at Renci.SshNet.ShellStream.Expect(TimeSpan timeout, ExpectAction[] expectActions)   
at Renci.SshNet.ShellStream.Expect(ExpectAction[] expectActions)   at HDTestWinForm.Form1.method(recording row) in Form1.cs:line 283
very simple example but every time the code makes it to both writetolog methods.
The issue is just before the debug would go from the method to the end brace of rS1a an exception is thrown.
It appears to be a problem with Dequeue Method but why?
This happens sometimes 1 out of every 3 tries for my routine.  Nothing is different per try other than a filename.
Is there a way to check the Queue? I am not seeing a way to inspect this?


Viewing all articles
Browse latest Browse all 1729

Trending Articles