fix command line buffer and test addr

This commit is contained in:
rustdesk
2023-03-16 00:53:58 +08:00
parent dc81956d42
commit 675bf3c1f5
2 changed files with 8 additions and 11 deletions

View File

@@ -379,7 +379,7 @@ async fn handle_connection(
let limiter = limiter.clone();
tokio::spawn(async move {
let mut stream = stream;
let mut buffer = [0; 64];
let mut buffer = [0; 1024];
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;