diff --git a/app/Server/Service/ServerLauncher.cs b/app/Server/Service/ServerLauncher.cs index 959b9c5..1e5ab3b 100644 --- a/app/Server/Service/ServerLauncher.cs +++ b/app/Server/Service/ServerLauncher.cs @@ -93,11 +93,12 @@ namespace DHT.Server.Service { if (Server != null) { Log.Info("Stopping server..."); Server.StopAsync().Wait(); + Server.Dispose(); + Server = null; Log.Info("Server stopped"); IsRunning = false; ServerStatusChanged?.Invoke(null, EventArgs.Empty); - Server = null; } }