mirror of
https://github.com/rustdesk/rustdesk-server.git
synced 2026-11-28 16:54:02 +00:00
fix: write complete administrative console responses (#717)
* fix: write complete administrative console responses * Document changed function contracts
This commit is contained in:
1 parent
1bd3938cfe
commit
36a0996ee8
2 files changed
+4
-2
No files matched your search
+2
-1
@@ -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();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user