Fix NRE in DisposeAsyncCore

This commit is contained in:
MBR#0001 2023-02-15 21:07:36 +01:00
parent 87b2bc5dc4
commit c338aa7cb5
No known key found for this signature in database
GPG Key ID: A938970B8DD3F170

View File

@ -1184,10 +1184,13 @@ namespace Emby.Server.Implementations
}
}
// used for closing websockets
foreach (var session in _sessionManager.Sessions)
if (_sessionManager != null)
{
await session.DisposeAsync().ConfigureAwait(false);
// used for closing websockets
foreach (var session in _sessionManager.Sessions)
{
await session.DisposeAsync().ConfigureAwait(false);
}
}
}
}