mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Remove one session per device id limitation
This commit is contained in:
parent
5c5daac98c
commit
8d6e7d893b
@ -1519,24 +1519,9 @@ namespace Emby.Server.Implementations.Session
|
|||||||
DeviceId = deviceId
|
DeviceId = deviceId
|
||||||
}).ConfigureAwait(false)).Items;
|
}).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)
|
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;
|
return existing.AccessToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user