diff options
| author | marios8543 <marios8543@gmail.com> | 2023-10-18 21:04:51 +0300 |
|---|---|---|
| committer | marios8543 <marios8543@gmail.com> | 2023-10-18 21:04:51 +0300 |
| commit | 28ca7b5c904ab67fab4147a340f2d78ca9a6e473 (patch) | |
| tree | 3e21dcc88f3a57fca0b5940f6c9fef2db583e1f1 /backend/src/plugin | |
| parent | feabb582b2def5ad437a57dc9600d398d32fcfab (diff) | |
| download | decky-loader-28ca7b5c904ab67fab4147a340f2d78ca9a6e473.tar.gz decky-loader-28ca7b5c904ab67fab4147a340f2d78ca9a6e473.zip | |
fix emit_message mechanism
Diffstat (limited to 'backend/src/plugin')
| -rw-r--r-- | backend/src/plugin/plugin.py | 4 | ||||
| -rw-r--r-- | backend/src/plugin/sandboxed_plugin.py | 2 |
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 8540bebc..d44794fa 100644 --- a/backend/src/plugin/sandboxed_plugin.py +++ b/backend/src/plugin/sandboxed_plugin.py @@ -127,7 +127,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 |
