Skip to content

Commit

Permalink
Revert "Call plugin unload function after stopping event loop (SteamD…
Browse files Browse the repository at this point in the history
…eckHomebrew#539)" (SteamDeckHomebrew#584)

This reverts commit 39f4f28 , because functions (seemingly) don't run after the event loop closes, so the unload function is never actually run.
  • Loading branch information
PartyWumpus authored and bricefriha committed Jun 1, 2024
1 parent 77778da commit b5e0c9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,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")

# TODO there is definitely a better way to type this
Expand Down

0 comments on commit b5e0c9e

Please sign in to comment.