propagates the hash-handler continuation result through both connection loops, allowing incoming-only rejection to terminate the connection while preserving existing login flows.

This commit is contained in:
rustdesk
2026-08-10 16:45:27 +08:00
parent d407db9fae
commit 947cb3f17b
4 changed files with 17 additions and 10 deletions

View File

@@ -150,7 +150,9 @@ async fn connect_and_login(
let msg_in = Message::parse_from_bytes(&bytes)?;
match msg_in.union {
Some(message::Union::Hash(hash)) => {
interface.handle_hash(password, hash, &mut stream).await;
if !interface.handle_hash(password, hash, &mut stream).await {
return Ok(None);
}
}
Some(message::Union::LoginResponse(lr)) => match lr.union {
Some(login_response::Union::Error(err)) => {