Revert "Call plugin unload function after stopping event loop (#539)" (#584)

This reverts commit 39f4f2870b , because functions (seemingly) don't run after the event loop closes, so the unload function is never actually run.
This commit is contained in:
Party Wumpus
2024-02-09 20:33:47 +00:00
committed by GitHub
parent fd4ed811be
commit 2500b748ce
+1 -1
View File
@@ -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