From 57a22673049e34f2c314cc20df96ab91da0de314 Mon Sep 17 00:00:00 2001 From: Patrick Barron Date: Thu, 30 Nov 2023 11:34:18 -0500 Subject: [PATCH] Use ObjectDisposedException throw helper in UdpServerEntryPoint --- .../EntryPoints/UdpServerEntryPoint.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs b/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs index 56ccb21ee7..2af2677855 100644 --- a/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs +++ b/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs @@ -68,7 +68,7 @@ namespace Emby.Server.Implementations.EntryPoints /// 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); - } - } - /// public void Dispose() {