Added requested comment (#3640)

This commit is contained in:
Paul Higinbotham 2017-04-24 16:21:21 -07:00 committed by Dongbo Wang
parent 6db5c945b2
commit b5f10ecba2

View File

@ -1556,7 +1556,10 @@ namespace System.Management.Automation.Remoting.Client
return string.Empty;
}
// SSH may return a multi-line error message
// SSH may return a multi-line error message.
// The StdError pipe stream is open ended causing StreamReader read operations to block
// if there is no incoming data. Since we don't know how many error message lines there
// will be we use an asynchronous read with timeout to prevent blocking indefinitely.
System.Text.StringBuilder sb = new Text.StringBuilder(error);
var running = true;
while (running)