Fix consumer count off by one when closing a browser tab with a livestream that is transcoding (#13220)

Rework Implementation
Fix review issues
Add missing nullorempty check
Fix closely related #13721
This commit is contained in:
timminator
2025-03-28 00:59:08 +01:00
committed by GitHub
parent ae4b35da46
commit 181a37a8cd
3 changed files with 87 additions and 17 deletions

View File

@@ -242,14 +242,7 @@ public sealed class TranscodeManager : ITranscodeManager, IDisposable
if (closeLiveStream && !string.IsNullOrWhiteSpace(job.LiveStreamId))
{
try
{
await _mediaSourceManager.CloseLiveStream(job.LiveStreamId).ConfigureAwait(false);
}
catch (Exception ex)
{
_logger.LogError(ex, "Error closing live stream for {Path}", job.Path);
}
await _sessionManager.CloseLiveStreamIfNeededAsync(job.LiveStreamId, job.PlaySessionId).ConfigureAwait(false);
}
}