diff options
| author | Patrick Barron <barronpm@gmail.com> | 2023-11-30 11:34:18 -0500 |
|---|---|---|
| committer | Patrick Barron <barronpm@gmail.com> | 2023-11-30 11:57:09 -0500 |
| commit | 57a22673049e34f2c314cc20df96ab91da0de314 (patch) | |
| tree | c6c49be6049bf092abfe3179ee78bf14e33d413c /Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs | |
| parent | 9597648ce3b96829429dc96235ca409914a8545b (diff) | |
Use ObjectDisposedException throw helper in UdpServerEntryPoint
Diffstat (limited to 'Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs')
| -rw-r--r-- | Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs b/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs index 56ccb21ee..2af267785 100644 --- a/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs +++ b/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs @@ -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() { |
