aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/EntryPoints
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2021-02-23 19:19:38 +0900
committerdkanada <dkanada@users.noreply.github.com>2021-02-23 19:19:38 +0900
commitbc746b4d05f440b4910751ab7ae70e81ad470892 (patch)
tree0642ed74e91511214e4d4b8a3beb40b9c7a8e7d4 /Emby.Server.Implementations/EntryPoints
parent9caf3119257544d6fb8fd3e1f1cb2b50eba7bd39 (diff)
parent7ece3c552337340a997a75aab1520a501a673f61 (diff)
merge branch 'master' into auto-manifest
Diffstat (limited to 'Emby.Server.Implementations/EntryPoints')
-rw-r--r--Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs b/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs
index 9486874d5..a12a6b26c 100644
--- a/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs
+++ b/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs
@@ -1,3 +1,5 @@
+#nullable enable
+
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;
@@ -29,7 +31,7 @@ namespace Emby.Server.Implementations.EntryPoints
/// <summary>
/// The UDP server.
/// </summary>
- private UdpServer _udpServer;
+ private UdpServer? _udpServer;
private CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource();
private bool _disposed = false;
@@ -71,9 +73,8 @@ namespace Emby.Server.Implementations.EntryPoints
}
_cancellationTokenSource.Cancel();
- _udpServer.Dispose();
_cancellationTokenSource.Dispose();
- _cancellationTokenSource = null;
+ _udpServer?.Dispose();
_udpServer = null;
_disposed = true;