Skip to content

Commit

Permalink
hotfix: tower cannot parse host message
Browse files Browse the repository at this point in the history
  • Loading branch information
LimJunxue committed Jul 9, 2024
1 parent 2963c9a commit 90a8d8a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions pymeca-actors/src/functions/host_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,7 @@ async def connect_to_tower(
)
except ValueError as e:
print(e)
await websocket.send(str(e))
return
await websocket.send(sign_message(host_encryption_private_key, repr(e).encode()))

try:
# run the task
Expand Down Expand Up @@ -253,5 +252,4 @@ async def connect_to_tower(
print("Task output sent")
except Exception as e:
print(e)
await websocket.send(str(e))
return
await websocket.send(sign_message(host_encryption_private_key, repr(e).encode()))
2 changes: 1 addition & 1 deletion tower/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ async def websocket_endpoint(websocket: WebSocket):

try:
while True:
task_output = await websocket.recv()
task_output = await websocket.receive_bytes()
task_id = "0x" + task_output[0:32].hex()
signature = task_output[-65:]
verify = pymeca.utils.verify_signature_pub_key(
Expand Down

0 comments on commit 90a8d8a

Please sign in to comment.