diff --git a/backend/decky_loader/plugin/sandboxed_plugin.py b/backend/decky_loader/plugin/sandboxed_plugin.py index f1b3f09d1..f83636f1b 100644 --- a/backend/decky_loader/plugin/sandboxed_plugin.py +++ b/backend/decky_loader/plugin/sandboxed_plugin.py @@ -143,11 +143,11 @@ async def on_new_message(self, message : str) -> str | None: 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 = {"type": SocketMessageType.RESPONSE, "res": None, "success": True, "id": data["id"]}