소스 검색

Move throwing if cancelled after logging that fact

Vasily 5 년 전
부모
커밋
8cf8c36708
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs

+ 1 - 1
MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs

@@ -508,7 +508,6 @@ namespace MediaBrowser.Api.Playback.Hls
                     await Task.Delay(100, cancellationToken).ConfigureAwait(false);
                 }
 
-                cancellationToken.ThrowIfCancellationRequested();
                 if (!File.Exists(segmentPath))
                 {
                     Logger.LogWarning("cannot serve {0} as transcoding quit before we got there", segmentPath);
@@ -517,6 +516,7 @@ namespace MediaBrowser.Api.Playback.Hls
                 {
                     Logger.LogDebug("serving {0} as it's on disk and transcoding stopped", segmentPath);
                 }
+                cancellationToken.ThrowIfCancellationRequested();
             }
             else
             {