Use ObjectDisposedException throw helper in UdpServerEntryPoint

This commit is contained in:
Patrick Barron 2023-11-30 11:34:18 -05:00
parent 9597648ce3
commit 57a2267304
1 changed files with 1 additions and 9 deletions

View File

@ -68,7 +68,7 @@ namespace Emby.Server.Implementations.EntryPoints
/// <inheritdoc />
public Task RunAsync()
{
CheckDisposed();
ObjectDisposedException.ThrowIf(_disposed, this);
if (!_configurationManager.GetNetworkConfiguration().AutoDiscovery)
{
@ -123,14 +123,6 @@ namespace Emby.Server.Implementations.EntryPoints
return Task.CompletedTask;
}
private void CheckDisposed()
{
if (_disposed)
{
throw new ObjectDisposedException(GetType().Name);
}
}
/// <inheritdoc />
public void Dispose()
{