mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-09-12 15:31:02 +03:00
Compare commits
3 Commits
master
...
ba65c30df1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba65c30df1 | ||
|
|
ac0b226568 | ||
|
|
0d8a52bc5a |
@@ -585,13 +585,9 @@ impl Connection {
|
|||||||
crate::rustdesk_interval(time::interval_at(Instant::now(), TEST_DELAY_TIMEOUT));
|
crate::rustdesk_interval(time::interval_at(Instant::now(), TEST_DELAY_TIMEOUT));
|
||||||
let mut last_recv_time = Instant::now();
|
let mut last_recv_time = Instant::now();
|
||||||
|
|
||||||
conn.stream.set_send_timeout(
|
// The connection type is not known until the login request arrives;
|
||||||
if conn.file_transfer.is_some() || conn.port_forward_socket.is_some() || conn.terminal {
|
// `on_message` picks the type-specific timeout then.
|
||||||
SEND_TIMEOUT_OTHER
|
conn.stream.set_send_timeout(SEND_TIMEOUT_VIDEO);
|
||||||
} else {
|
|
||||||
SEND_TIMEOUT_VIDEO
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||||
std::thread::spawn(move || Self::handle_input(_rx_input, tx_cloned));
|
std::thread::spawn(move || Self::handle_input(_rx_input, tx_cloned));
|
||||||
@@ -2766,6 +2762,17 @@ impl Connection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.stream.set_send_timeout(
|
||||||
|
if self.file_transfer.is_some()
|
||||||
|
|| self.terminal
|
||||||
|
|| matches!(self.lr.union, Some(login_request::Union::PortForward(_)))
|
||||||
|
{
|
||||||
|
SEND_TIMEOUT_OTHER
|
||||||
|
} else {
|
||||||
|
SEND_TIMEOUT_VIDEO
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
if !crate::common::is_direct_ip_access(&lr.username) && lr.username != Config::get_id()
|
if !crate::common::is_direct_ip_access(&lr.username) && lr.username != Config::get_id()
|
||||||
{
|
{
|
||||||
self.send_login_error(crate::client::LOGIN_MSG_OFFLINE)
|
self.send_login_error(crate::client::LOGIN_MSG_OFFLINE)
|
||||||
|
|||||||
Reference in New Issue
Block a user