in SimpleDUTRemote/JobSystem/Job.cs [103:132]
private void StreamingLoopHandler()
{
string nextLine;
while ((nextLine = streamingCollection.Take()) != null)
{
try
{
outputLogSteam.WriteLine(nextLine);
progressStream?.WriteLine(nextLine);
}
catch (IOException e)
{
if (!(e.InnerException is SocketException)) throw;
logger.Error("Failed to stream progress from process - socket exception ocurred.");
logger.Error("Logging will continue to the the file log.");
progressStream.Dispose();
progressStream = null;
}
catch (ObjectDisposedException)
{
logger.Debug("Stream object was disposed while streaming output - this likely means this job was terminated.");
return; // break out of the function if this happens.
}
}
CloseStreams();
}