summaryrefslogtreecommitdiff
path: root/backend/src/plugin
diff options
context:
space:
mode:
authormarios8543 <marios8543@gmail.com>2023-10-18 21:04:51 +0300
committermarios8543 <marios8543@gmail.com>2023-10-31 23:18:31 +0200
commit7565a66d9084c71f499be3f99d3e70e3368c1f00 (patch)
treeced5c86ad8c79d22ebab1ceedc22f38eb73debbc /backend/src/plugin
parente4b1efc44dc2f8dc718c809ea50680de626474c4 (diff)
downloaddecky-loader-7565a66d9084c71f499be3f99d3e70e3368c1f00.tar.gz
decky-loader-7565a66d9084c71f499be3f99d3e70e3368c1f00.zip
fix emit_message mechanism
Diffstat (limited to 'backend/src/plugin')
-rw-r--r--backend/src/plugin/plugin.py4
-rw-r--r--backend/src/plugin/sandboxed_plugin.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/backend/src/plugin/plugin.py b/backend/src/plugin/plugin.py
index befd1569..6c338106 100644
--- a/backend/src/plugin/plugin.py
+++ b/backend/src/plugin/plugin.py
@@ -50,8 +50,8 @@ class PluginWrapper:
res = loads(line)
if res["id"] == "0":
create_task(self.emitted_message_callback(res["payload"]))
- return
- self._method_call_requests.pop(res["id"]).set_result(res)
+ else:
+ self._method_call_requests.pop(res["id"]).set_result(res)
except:
pass
diff --git a/backend/src/plugin/sandboxed_plugin.py b/backend/src/plugin/sandboxed_plugin.py
index c437f249..c3656980 100644
--- a/backend/src/plugin/sandboxed_plugin.py
+++ b/backend/src/plugin/sandboxed_plugin.py
@@ -132,7 +132,7 @@ class SandboxedPlugin:
return dumps(d, ensure_ascii=False)
async def emit_message(self, message: Dict[Any, Any]):
- await self._socket.write_single_line(dumps({
+ await self._socket.write_single_line_server(dumps({
"id": "0",
"payload": message
})) \ No newline at end of file