mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-13 12:15:09 +03:00
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
This commit is contained in:
@@ -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"]}
|
||||
|
||||
Reference in New Issue
Block a user