From 6b6fede2e0b1c1edd06af3bcdbf5c5ad04d07638 Mon Sep 17 00:00:00 2001 From: Vasily Date: Wed, 16 Oct 2019 16:13:59 +0300 Subject: [PATCH] Address review comments --- .../HttpServer/HttpListenerHost.cs | 1 + MediaBrowser.Api/Playback/BaseStreamingService.cs | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs index 0ebdf7d178..cd2a7dcf06 100644 --- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -543,6 +543,7 @@ namespace Emby.Server.Implementations.HttpServer { _logger.LogDebug("Sending HTTP Response 500 in response to {Url}", urlToLog); } + stopWatch.Stop(); var elapsed = stopWatch.Elapsed; if (elapsed.TotalMilliseconds > 500) diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 2e9c1c3d4c..fa8fbe261c 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -296,13 +296,13 @@ namespace MediaBrowser.Api.Playback _ = new JobLogger(Logger).StartStreamingLog(state, process.StandardError.BaseStream, logStream); // Wait for the file to exist before proceeeding - var waitFor = state.WaitForPath ?? outputPath; - Logger.LogDebug("Waiting for the creation of {0}", waitFor); - while (!File.Exists(waitFor) && !transcodingJob.HasExited) + var ffmpegTargetFile = state.WaitForPath ?? outputPath; + Logger.LogDebug("Waiting for the creation of {0}", ffmpegTargetFile); + while (!File.Exists(ffmpegTargetFile) && !transcodingJob.HasExited) { await Task.Delay(100, cancellationTokenSource.Token).ConfigureAwait(false); } - Logger.LogDebug("File {0} created or transcoding has finished", waitFor); + Logger.LogDebug("File {0} created or transcoding has finished", ffmpegTargetFile); if (state.IsInputVideo && transcodingJob.Type == TranscodingJobType.Progressive && !transcodingJob.HasExited) {