Merge branch 'next' into next-polkadot-sdk

This commit is contained in:
Luke Parker
2025-11-04 13:22:32 -05:00
9 changed files with 45 additions and 21 deletions

View File

@@ -239,8 +239,7 @@ async fn main() {
// TODO: Add a magic value with a key at the start of the connection to make this authed
let mut db = db.clone();
tokio::spawn(async move {
loop {
let Ok(msg_len) = socket.read_u32_le().await else { break };
while let Ok(msg_len) = socket.read_u32_le().await {
let mut buf = vec![0; usize::try_from(msg_len).unwrap()];
let Ok(_) = socket.read_exact(&mut buf).await else { break };
let msg = borsh::from_slice(&buf).unwrap();