refactor: use Channels as queueing mechanism for periodic websocket messages (#11092)

This commit is contained in:
Claus Vium
2024-03-18 20:55:18 +01:00
committed by GitHub
parent 1271e60532
commit eae031ae5a
5 changed files with 175 additions and 113 deletions

View File

@@ -456,8 +456,8 @@ namespace Emby.Server.Implementations.Session
if (!_activeConnections.TryGetValue(key, out var sessionInfo))
{
_activeConnections[key] = await CreateSession(key, appName, appVersion, deviceId, deviceName, remoteEndPoint, user).ConfigureAwait(false);
sessionInfo = _activeConnections[key];
sessionInfo = await CreateSession(key, appName, appVersion, deviceId, deviceName, remoteEndPoint, user).ConfigureAwait(false);
_activeConnections[key] = sessionInfo;
}
sessionInfo.UserId = user?.Id ?? Guid.Empty;
@@ -614,9 +614,6 @@ namespace Emby.Server.Implementations.Session
_logger.LogDebug(ex, "Error calling OnPlaybackStopped");
}
}
playingSessions = Sessions.Where(i => i.NowPlayingItem is not null)
.ToList();
}
else
{