summaryrefslogtreecommitdiff
path: root/backend/decky_loader/plugin/plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'backend/decky_loader/plugin/plugin.py')
-rw-r--r--backend/decky_loader/plugin/plugin.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/backend/decky_loader/plugin/plugin.py b/backend/decky_loader/plugin/plugin.py
index 61b5ca4f..94e411bc 100644
--- a/backend/decky_loader/plugin/plugin.py
+++ b/backend/decky_loader/plugin/plugin.py
@@ -108,11 +108,9 @@ class PluginWrapper:
self._listener_task = create_task(self._response_listener())
return self
- def stop(self, uninstall: bool = False):
+ async def stop(self, uninstall: bool = False):
+ if hasattr(self, "_socket"):
+ await self._socket.write_single_line(dumps({ "stop": True, "uninstall": uninstall }, ensure_ascii=False))
+ await self._socket.close_socket_connection()
if hasattr(self, "_listener_task"):
- self._listener_task.cancel()
- async def _(self: PluginWrapper):
- if hasattr(self, "_socket"):
- await self._socket.write_single_line(dumps({ "stop": True, "uninstall": uninstall }, ensure_ascii=False))
- await self._socket.close_socket_connection()
- create_task(_(self)) \ No newline at end of file
+ self._listener_task.cancel() \ No newline at end of file