aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaus Vium <cvium@users.noreply.github.com>2023-02-15 21:59:24 +0100
committerGitHub <noreply@github.com>2023-02-15 21:59:24 +0100
commit3fe64f69b747f39a6505e4fad1bbd6eaf63cecc4 (patch)
treea580184fdb7f3a8be2741f0f96ec3633450fbc5e
parent87b2bc5dc4b19f275488178fec25e56e23047fec (diff)
parentc338aa7cb5c1ce2c011a419c251184d247ea1e5b (diff)
Merge pull request #9320 from MBR-0001/master
Fix NRE in DisposeAsyncCore
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index 37a9e7715..d104058cc 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -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);
+ }
}
}
}