Refresh is async

Now we are ready for more asyncery (e.g., docker)
This commit is contained in:
John Doty 2024-08-04 08:29:33 -07:00
parent c2c57289cf
commit 8135f163f2
2 changed files with 2 additions and 2 deletions

View file

@ -32,7 +32,7 @@ async fn server_loop<Reader: AsyncRead + Unpin>(
match reader.read().await? {
Ping => (),
Refresh => {
let ports = match refresh::get_entries() {
let ports = match refresh::get_entries().await {
Ok(ports) => ports,
Err(e) => {
error!("Error scanning: {:?}", e);

View file

@ -7,7 +7,7 @@ use crate::message::PortDesc;
#[cfg(target_os = "linux")]
mod procfs;
pub fn get_entries() -> Result<Vec<PortDesc>> {
pub async fn get_entries() -> Result<Vec<PortDesc>> {
#[allow(unused)]
let mut attempts = 0;