scanner status command(3)

Signed-off-by: mujunxiang <1948535941@qq.com>
This commit is contained in:
mujunxiang
2024-12-03 10:14:46 +08:00
parent f707639392
commit bedc81e973
3 changed files with 10 additions and 11 deletions
+6 -4
View File
@@ -39,10 +39,9 @@ use std::task::{Context, Poll};
use std::time::Duration as std_Duration;
use std::u64;
use time::{Duration, OffsetDateTime};
use tokio::spawn;
use tokio::sync::mpsc::error::TryRecvError;
use tokio::sync::mpsc::{self, Receiver};
use tokio::sync::mpsc::{self};
use tokio::time::interval;
use tokio::{select, spawn};
use tokio_stream::wrappers::ReceiverStream;
use tracing::{error, info, warn};
@@ -446,7 +445,10 @@ impl Operation for MetricsHandler {
break;
}
interval.tick().await;
select! {
_ = tx.closed() => { return; }
_ = interval.tick() => {}
}
}
});