From eae031ae5acf948fbc303eb589b469953179f2ed Mon Sep 17 00:00:00 2001 From: Claus Vium Date: Mon, 18 Mar 2024 20:55:18 +0100 Subject: refactor: use Channels as queueing mechanism for periodic websocket messages (#11092) --- Emby.Server.Implementations/Session/SessionManager.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'Emby.Server.Implementations') diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index 40b3b0339e..75945b08a2 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -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 { -- cgit v1.2.3