aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Barron <barronpm@gmail.com>2023-11-30 12:07:49 -0500
committerPatrick Barron <barronpm@gmail.com>2023-11-30 12:07:49 -0500
commita37bd4e6592edaaad20bb3b225ab9fcd4e40f6f1 (patch)
tree4f6d74935c03d6d88d7b428710a5eac30924d288
parentfc1e27b7549014dbf1de16f2805c65f8a624fb2b (diff)
Use ObjectDisposedException throw helper in ExternalPortForwarding
-rw-r--r--Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs5
1 files changed, 1 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs b/Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs
index c4cd935c3..7de184745 100644
--- a/Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs
+++ b/Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs
@@ -128,10 +128,7 @@ namespace Emby.Server.Implementations.EntryPoints
private Task CreateRules(INatDevice device)
{
- if (_disposed)
- {
- throw new ObjectDisposedException(GetType().Name);
- }
+ ObjectDisposedException.ThrowIf(_disposed, this);
// On some systems the device discovered event seems to fire repeatedly
// This check will help ensure we're not trying to port map the same device over and over