Skip to content

Commit

Permalink
little endian
Browse files Browse the repository at this point in the history
  • Loading branch information
billyb2 committed Jun 22, 2024
1 parent e2e94a8 commit 94ab58d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pub async fn handle_internal_connection<M: MetaDB + 'static>(
let internal_private_key = internal_private_key.clone();
event!(Level::INFO, "Waiting for message");

let len = match read_sock.read_u32().await {
let len = match read_sock.read_u32_le().await {
Ok(len) => len,
Err(err) => {
event!(Level::INFO, error = err.to_string(), "Connection closed");
Expand All @@ -91,6 +91,8 @@ pub async fn handle_internal_connection<M: MetaDB + 'static>(
let resp =
handle_internal_message(meta_db.as_ref(), internal_private_key, enc_message).await;

event!(Level::INFO, "Sending response");
write_sock.write_all(resp.as_slice()).await.unwrap();
event!(Level::INFO, "Response sent");
}
}

0 comments on commit 94ab58d

Please sign in to comment.