diff options
| author | Jan <sentrycraft123@gmail.com> | 2023-12-16 03:07:54 +0100 |
|---|---|---|
| committer | AAGaming <aagaming@riseup.net> | 2023-12-29 18:40:53 -0500 |
| commit | 5190765ce16ccf1b8b544bcf916a6629ce1498d7 (patch) | |
| tree | b9cc6b67027830e3ced3769c3caba69702b2f882 /backend/decky_loader | |
| parent | 3a38cf807460f6c141ce4b131cef1944339778ae (diff) | |
| download | decky-loader-5190765ce16ccf1b8b544bcf916a6629ce1498d7.tar.gz decky-loader-5190765ce16ccf1b8b544bcf916a6629ce1498d7.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/decky_loader')
| -rw-r--r-- | backend/decky_loader/plugin/sandboxed_plugin.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/decky_loader/plugin/sandboxed_plugin.py b/backend/decky_loader/plugin/sandboxed_plugin.py index 6be97b4a..1c3c5bd2 100644 --- a/backend/decky_loader/plugin/sandboxed_plugin.py +++ b/backend/decky_loader/plugin/sandboxed_plugin.py @@ -115,11 +115,11 @@ class SandboxedPlugin: 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") d: SocketResponseDict = {"res": None, "success": True, "id": data["id"]} |
