mirror of
https://github.com/sshnet/SSH.NET.git
synced 2026-09-11 01:36:39 +00:00
Add locking in ShellStream Read function
This commit is contained in:
@@ -163,9 +163,12 @@ namespace Renci.SshNet
|
||||
{
|
||||
var i = 0;
|
||||
|
||||
for (; i < count && this._incoming.Count > 0; i++)
|
||||
lock (this._incoming)
|
||||
{
|
||||
buffer[offset + i] = this._incoming.Dequeue();
|
||||
for (; i < count && this._incoming.Count > 0; i++)
|
||||
{
|
||||
buffer[offset + i] = this._incoming.Dequeue();
|
||||
}
|
||||
}
|
||||
|
||||
return i;
|
||||
|
||||
Reference in New Issue
Block a user