fix: correctly use dependency order to unload, declare all plugin services as deps to PM

This commit is contained in:
goat 2023-03-08 22:37:44 +01:00
parent af670d6b11
commit f032adb155
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
4 changed files with 222 additions and 26 deletions

View file

@ -492,7 +492,10 @@ public sealed class Framework : IDisposable, IServiceType
Log.Information("Framework::Destroy!");
Service<Dalamud>.Get().Unload();
this.RunPendingTickTasks();
ServiceManager.UnloadAllServices();
// why did we do this here? EntryPoint also does it when the signal is set, what sense does that make
// we should definitely wait for pending tick tasks though
// ServiceManager.UnloadAllServices();
Log.Information("Framework::Destroy OK!");
return this.destroyHook.OriginalDisposeSafe(framework);