diff options
| author | Jan <sentrycraft123@gmail.com> | 2023-12-16 03:07:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-15 18:07:54 -0800 |
| commit | 39f4f2870b4c0924421130a3f532c07320938e97 (patch) | |
| tree | 53860c25da63c0446a6b63ac88e8ebb6b098dcb1 /backend/src | |
| parent | 3489fd7d692503b8e2b5e255ab75cbbf9e371536 (diff) | |
| download | decky-loader-39f4f2870b4c0924421130a3f532c07320938e97.tar.gz decky-loader-39f4f2870b4c0924421130a3f532c07320938e97.zip | |
Call plugin unload function after stopping event loop (#539)
This can prevent race conditions where unload is clearing data but main is still working with it
Diffstat (limited to 'backend/src')
| -rw-r--r-- | backend/src/plugin.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/src/plugin.py b/backend/src/plugin.py index b57bc5f7..ed401b45 100644 --- a/backend/src/plugin.py +++ b/backend/src/plugin.py @@ -118,11 +118,11 @@ class PluginWrapper: if "stop" in data: self.log.info("Calling Loader unload function.") - await self._unload() get_event_loop().stop() while get_event_loop().is_running(): await sleep(0) get_event_loop().close() + await self._unload() raise Exception("Closing message listener") # TODO there is definitely a better way to type this |
