mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-02 14:21:28 +03:00
Refact. Replace all tokio::time::interval() (#7173)
* Refact. Replace all `tokio::time::interval()` Signed-off-by: fufesou <shuanglongchen@yeah.net> * Refact Better min_interval for `ThrottledInterval`. Signed-off-by: fufesou <shuanglongchen@yeah.net> --------- Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -442,7 +442,8 @@ pub mod server {
|
||||
|
||||
match ipc::connect(1000, postfix).await {
|
||||
Ok(mut stream) => {
|
||||
let mut timer = tokio::time::interval(Duration::from_secs(1));
|
||||
let mut timer =
|
||||
crate::rustdesk_interval(tokio::time::interval(Duration::from_secs(1)));
|
||||
let mut nack = 0;
|
||||
loop {
|
||||
tokio::select! {
|
||||
@@ -777,7 +778,7 @@ pub mod client {
|
||||
tokio::spawn(async move {
|
||||
let mut stream = Connection::new(stream);
|
||||
let postfix = postfix.to_owned();
|
||||
let mut timer = tokio::time::interval(Duration::from_secs(1));
|
||||
let mut timer = crate::rustdesk_interval(tokio::time::interval(Duration::from_secs(1)));
|
||||
let mut nack = 0;
|
||||
let mut rx = rx_clone.lock().await;
|
||||
loop {
|
||||
|
||||
Reference in New Issue
Block a user