mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-10-28 11:35:17 -07:00
fix(plugins): await plugin unload on quit with deactivate timeout
- Move plugin unload into the will-quit cleanup handler so it starts first and quit waits for it - Give each plugin's deactivate 3 s (configurable via deactivateTimeoutMs) before disposing it anyway - Document the quit timeout in docs-site/plugins.md
This commit is contained in:
8 files changed
+84
-5
No files matched your search
@@ -65,6 +65,7 @@ export function createBuildOnWillQuitCleanupDepsHandler(deps: {
|
||||
cleanupRemoteMediaWindows: () => void;
|
||||
cleanupJellyfinSubtitleCache: () => void;
|
||||
stopDiscordPresenceService: () => void;
|
||||
unloadPlugins: () => void | Promise<void>;
|
||||
}) {
|
||||
return () => ({
|
||||
destroyTray: () => deps.destroyTray(),
|
||||
@@ -154,5 +155,6 @@ export function createBuildOnWillQuitCleanupDepsHandler(deps: {
|
||||
cleanupRemoteMediaWindows: () => deps.cleanupRemoteMediaWindows(),
|
||||
cleanupJellyfinSubtitleCache: () => deps.cleanupJellyfinSubtitleCache(),
|
||||
stopDiscordPresenceService: () => deps.stopDiscordPresenceService(),
|
||||
unloadPlugins: () => deps.unloadPlugins(),
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user