Refresh is async
Now we are ready for more asyncery (e.g., docker)
This commit is contained in:
parent
c2c57289cf
commit
8135f163f2
2 changed files with 2 additions and 2 deletions
|
|
@ -32,7 +32,7 @@ async fn server_loop<Reader: AsyncRead + Unpin>(
|
||||||
match reader.read().await? {
|
match reader.read().await? {
|
||||||
Ping => (),
|
Ping => (),
|
||||||
Refresh => {
|
Refresh => {
|
||||||
let ports = match refresh::get_entries() {
|
let ports = match refresh::get_entries().await {
|
||||||
Ok(ports) => ports,
|
Ok(ports) => ports,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
error!("Error scanning: {:?}", e);
|
error!("Error scanning: {:?}", e);
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ use crate::message::PortDesc;
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
mod procfs;
|
mod procfs;
|
||||||
|
|
||||||
pub fn get_entries() -> Result<Vec<PortDesc>> {
|
pub async fn get_entries() -> Result<Vec<PortDesc>> {
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
let mut attempts = 0;
|
let mut attempts = 0;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue