diff options
| author | TrainDoctor <traindoctor@protonmail.com> | 2022-10-22 18:44:15 -0700 |
|---|---|---|
| committer | TrainDoctor <traindoctor@protonmail.com> | 2022-10-22 18:44:44 -0700 |
| commit | 6346da6fe54d39e972de2abca0dc38c29aa29ce9 (patch) | |
| tree | 26edc43373920d3fa9d1ff6ede4820ef8a615921 | |
| parent | af51a29055ca222b8324f80c84c19654eded11a4 (diff) | |
| download | decky-loader-6346da6fe54d39e972de2abca0dc38c29aa29ce9.tar.gz decky-loader-6346da6fe54d39e972de2abca0dc38c29aa29ce9.zip | |
Actually utilize the unload function
| -rw-r--r-- | backend/plugin.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/backend/plugin.py b/backend/plugin.py index 1bf187f6..a1d8394a 100644 --- a/backend/plugin.py +++ b/backend/plugin.py @@ -71,11 +71,11 @@ class PluginWrapper: self.log.error("Failed to start " + self.name + "!\n" + format_exc()) exit(0) - def _unload(self): + async def _unload(self): try: self.log.info("Attempting to unload " + self.name + "\n") if hasattr(self.Plugin, "_unload"): - self.Plugin._unload(self.Plugin) + await self.Plugin._unload(self.Plugin) except: self.log.error("Failed to unload " + self.name + "!\n" + format_exc()) exit(0) @@ -99,6 +99,7 @@ class PluginWrapper: break data = loads(line.decode("utf-8")) if "stop" in data: + await self._unload() get_event_loop().stop() while get_event_loop().is_running(): await sleep(0) |
