diff options
Diffstat (limited to 'Emby.Server.Implementations/LiveTv/TunerHosts/MulticastStream.cs')
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/TunerHosts/MulticastStream.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/MulticastStream.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/MulticastStream.cs index e650086d34..d4fcd7780e 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/MulticastStream.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/MulticastStream.cs @@ -13,7 +13,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts { public class MulticastStream { - private readonly ConcurrentDictionary<Guid,QueueStream> _outputStreams = new ConcurrentDictionary<Guid, QueueStream>(); + private readonly ConcurrentDictionary<Guid, QueueStream> _outputStreams = new ConcurrentDictionary<Guid, QueueStream>(); private const int BufferSize = 81920; private readonly ILogger _logger; @@ -31,9 +31,11 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts throw new ArgumentNullException("source"); } - while (!cancellationToken.IsCancellationRequested) + while (true) { - var bytesRead = await source.ReadAsync(buffer, 0, buffer.Length, cancellationToken).ConfigureAwait(false); + cancellationToken.ThrowIfCancellationRequested(); + + var bytesRead = source.Read(buffer, 0, buffer.Length); if (bytesRead > 0) { |
