mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-09 15:20:34 +02:00
Apply suggestions from code review
Co-authored-by: dkanada <dkanada@users.noreply.github.com>
This commit is contained in:
parent
3401d55f41
commit
c70e38288c
|
@ -121,15 +121,14 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
||||||
await taskCompletionSource.Task.ConfigureAwait(false);
|
await taskCompletionSource.Task.ConfigureAwait(false);
|
||||||
if (taskCompletionSource.Task.Exception != null)
|
if (taskCompletionSource.Task.Exception != null)
|
||||||
{
|
{
|
||||||
// Error happened during opening the stream, re-raise the exception to inform the caller
|
// Error happened while opening the stream so raise the exception again to inform the caller
|
||||||
throw taskCompletionSource.Task.Exception;
|
throw taskCompletionSource.Task.Exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!taskCompletionSource.Task.Result)
|
if (!taskCompletionSource.Task.Result)
|
||||||
{
|
{
|
||||||
Logger.LogWarning("Zero bytes copied from stream {0} to {1} but no exception raised", GetType().Name, TempFilePath);
|
Logger.LogWarning("Zero bytes copied from stream {0} to {1} but no exception raised", GetType().Name, TempFilePath);
|
||||||
throw new EndOfStreamException(String.Format(CultureInfo.InvariantCulture,
|
throw new EndOfStreamException(String.Format(CultureInfo.InvariantCulture, "Zero bytes copied from stream {0}", GetType().Name));
|
||||||
"Zero bytes copied from stream {0}",
|
|
||||||
GetType().Name));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,6 +161,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
||||||
Logger.LogError(ex, "Error copying live stream {0} to {1}.", GetType().Name, TempFilePath);
|
Logger.LogError(ex, "Error copying live stream {0} to {1}.", GetType().Name, TempFilePath);
|
||||||
openTaskCompletionSource.TrySetException(ex);
|
openTaskCompletionSource.TrySetException(ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
openTaskCompletionSource.TrySetResult(false);
|
openTaskCompletionSource.TrySetResult(false);
|
||||||
|
|
||||||
EnableStreamSharing = false;
|
EnableStreamSharing = false;
|
||||||
|
|
Loading…
Reference in a new issue