mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-05 04:59:05 +08:00
fix relay connection for key exchange message
This commit is contained in:
parent
e752c726ed
commit
b6e55f2a49
@ -619,8 +619,10 @@ impl Client {
|
||||
..Default::default()
|
||||
});
|
||||
socket.send(&msg_out).await?;
|
||||
if let Some(Ok(bytes)) = socket.next_timeout(CONNECT_TIMEOUT).await {
|
||||
if let Ok(msg_in) = RendezvousMessage::parse_from_bytes(&bytes) {
|
||||
|
||||
if let Some(msg_in) =
|
||||
crate::get_next_nonkeyexchange_msg(&mut socket, Some(CONNECT_TIMEOUT)).await
|
||||
{
|
||||
if let Some(rendezvous_message::Union::RelayResponse(rs)) = msg_in.union {
|
||||
if !rs.refuse_reason.is_empty() {
|
||||
bail!(rs.refuse_reason);
|
||||
@ -630,7 +632,6 @@ impl Client {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if !succeed {
|
||||
bail!("Timeout");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user