瀏覽代碼

Remove one session per device id limitation

Bill Thornton 1 年之前
父節點
當前提交
8d6e7d893b
共有 1 個文件被更改,包括 1 次插入16 次删除
  1. 1 16
      Emby.Server.Implementations/Session/SessionManager.cs

+ 1 - 16
Emby.Server.Implementations/Session/SessionManager.cs

@@ -1519,24 +1519,9 @@ namespace Emby.Server.Implementations.Session
                     DeviceId = deviceId
                 }).ConfigureAwait(false)).Items;
 
-            foreach (var auth in allExistingForDevice)
-            {
-                if (existing is null || !string.Equals(auth.AccessToken, existing.AccessToken, StringComparison.Ordinal))
-                {
-                    try
-                    {
-                        await Logout(auth).ConfigureAwait(false);
-                    }
-                    catch (Exception ex)
-                    {
-                        _logger.LogError(ex, "Error while logging out.");
-                    }
-                }
-            }
-
             if (existing is not null)
             {
-                _logger.LogInformation("Reissuing access token: {Token}", existing.AccessToken);
+                _logger.LogInformation("Reusing existing access token: {Token}", existing.AccessToken);
                 return existing.AccessToken;
             }