private void CloseStreams()

in SimpleDUTRemote/JobSystem/Job.cs [257:286]


        private void CloseStreams()
        {
            // ensure cleanup is threadsafe
            lock (lockObj)
            {
                try
                {
                    // if necessary, shutdown network progress stream
                    if (progressStream != null)
                    {
                        progressStream.Close(); //closes network streams
                        progressStream = null;
                    }
                }
                catch (IOException e)
                {
                    if (!(e.InnerException is SocketException)) throw;
                    logger.Error("A SocketException occurred while closing progress socket streams.");

                }
                finally
                {
                    if (outputLogSteam != null)
                    {
                        outputLogSteam.Close(); //close file stream
                        outputLogSteam = null;
                    }
                }
            }
        }