start listing some specific threats

This commit is contained in:
Joseph Montanaro
2022-12-13 10:58:52 -08:00
parent 1e4e1c9a5f
commit 48269855e5
2 changed files with 26 additions and 2 deletions

View File

@ -34,7 +34,7 @@ fn get_associated_pids(local_port: u16) -> Result<Vec<u32>, netstat2::error::Err
pub fn get_client_info(local_port: u16) -> Result<(), ClientInfoError> {
let mut sys = System::new();
for p in get_associated_pids(local_port)? {
let pid = Pid::from(p as usize);
let pid = Pid::from(p as i32);
sys.refresh_process(pid);
let proc = sys.process(pid)
.ok_or(ClientInfoError::PidNotFound)?;