From 8efc3c876a198fdec3aa098746d1336cc81bc233 Mon Sep 17 00:00:00 2001 From: Rasmus Melchior Jacobsen Date: Thu, 1 Feb 2024 15:22:50 +0100 Subject: [PATCH] fix(UdpServer): Avoid debug assertion if disposing not started server --- source/NetCoreServer/UdpServer.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/NetCoreServer/UdpServer.cs b/source/NetCoreServer/UdpServer.cs index 183b9ef..35198d7 100644 --- a/source/NetCoreServer/UdpServer.cs +++ b/source/NetCoreServer/UdpServer.cs @@ -934,7 +934,10 @@ protected virtual void Dispose(bool disposingManagedResources) if (disposingManagedResources) { // Dispose managed resources here... - Stop(); + if (IsStarted) + { + Stop(); + } } // Dispose unmanaged resources here...