olegkap has applied patch #13964.
Comment:
Applied in 23335 commit
olegkap has applied patch #13964.
Comment:
Applied in 23335 commit
I applied this fix in 23335 commit, with some minor modification, I did it actually a while ago but forgot to commit it so can you please take a look and see if it works?
Thanks,
Oleg
Hi guys,
Thanks for this feedback and sorry for late reply to this one.
I guess I missed locking _incoming in Channel_DataReceived method, thanks blakeja.
I guess I overlooked it.
I just committed your fix so please let me know if it works which I think should solve this issue as this is the only place where I didn't lock _incoming object it seems.
Thanks,
Oleg
Hi,
Well, I do have a lock which will enforce only 3 connection at a time to allow authenticate but once it is authenticated it should allow more connections to be established.
Does this behavior the same when you try to connect to different host?
Sometimes server will enforce different policies and will drop connection if policy is violated.
Can you try with different server and let me know what happens?
Thanks,
Oleg
Yes, each is a different host - I'm connecting to about 10 at a time then using SshShellStream to write commands and read responses from each simultaneously.
Hi,
If I remember correctly when I was doing test I also tested against scenario where file is smaller than a buffer but I might be wrong.
Can you post a code example that I can use to recreate the problem?
As far as InternalUploadFile method, it exits only when all responses was received to request sent by do..while loop and all bytes are read from input stream.
Hope it helps.
Thanks,
Oleg
var connectionInfo = new PasswordConnectionInfo("host", "username", "password");
var encoding = new Renci.SshNet.Common.ASCIIEncoding();
connectionInfo.PasswordExpired += delegate(object sender, AuthenticationPasswordChangeEventArgs e)
{
e.NewPassword = encoding.GetBytes("123456");
};
using (var client = new SshClient(connectionInfo))
{
client.Connect();
client.Disconnect();
}
Hope it helps.I haven't seen this exception again, I believe this fixed issue.
Thanks for checking that I am closing this issue now.
Thanks,
Oleg