fix: write complete administrative console responses (#717)

* fix: write complete administrative console responses

* Document changed function contracts
This commit is contained in:
jahvari authored and GitHub committed 2026-11-07 12:52:17 +08:00
1 parent 1bd3938cfe
commit 36a0996ee8
2 files changed
+4 -2

No files matched your search

+2 -1
View File
@@ -385,6 +385,7 @@ async fn io_loop(
}
}
/// Accepts a relay connection and routes loopback console requests separately.
async fn handle_connection(
stream: TcpStream,
addr: SocketAddr,
@@ -401,7 +402,7 @@ async fn handle_connection(
if let Ok(Ok(n)) = timeout(1000, stream.read(&mut buffer[..])).await {
if let Ok(data) = std::str::from_utf8(&buffer[..n]) {
let res = check_cmd(data, limiter).await;
stream.write(res.as_bytes()).await.ok();
stream.write_all(res.as_bytes()).await.ok();
}
}
});