fix: reliable Mudfish removal on plugin uninstall

Decky 3.3 often SIGKILLs plugins 5s after SIGTERM because its socket
listener spins on EOF and starves the event loop (seen for several
plugins). So:
- _unload/_uninstall run synchronously (an awaited worker thread could
  never resume), and the daemon stop no longer waits.
- A transient systemd path unit watches the plugins folder; if this
  plugin's folder stays gone for 20s it stops the daemon and deletes
  /opt/mudfish and the plugin settings, then removes itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ysj7705andClaude Opus 5.5 committed 2026-10-24 22:14:51 +09:00
1 parent 3c28c9dac2
commit bc45f66da5
5 files changed
+75 -7

No files matched your search

+1 -1
View File
@@ -170,7 +170,7 @@ class Controller:
self._teardown()
except Exception as e:
log.warning("uninstall: teardown failed: %s", e)
for step in (self.system.stop_daemon, self.system.remove_nm_connection,
for step in (lambda: self.system.stop_daemon(wait=False), self.system.remove_nm_connection,
lambda: self.installer.remove_all(self.installer.MUDFISH_ROOT)):
try:
step()