Fix not fully disposing internal app server when stopped

This commit is contained in:
chylex 2022-03-12 19:16:55 +01:00
parent 58259c0bb4
commit 1bddde7ccd
No known key found for this signature in database
GPG Key ID: 4DE42C8F19A80548

View File

@ -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;
}
}