feat: update procfs
This commit is contained in:
@@ -42,8 +42,9 @@ pub fn get_process(port: u16) -> Option<Process> {
|
||||
}
|
||||
Ok(tcp) => tcp,
|
||||
};
|
||||
let local_ip = std::net::Ipv4Addr::LOCALHOST;
|
||||
for entry in tcp.into_iter() {
|
||||
if port == entry.local_address.port() {
|
||||
if local_ip == entry.local_address.ip() && port == entry.local_address.port() {
|
||||
if let Some((stat, exec)) = map.get(&entry.inode) {
|
||||
return Some(Process {
|
||||
pid: stat.pid,
|
||||
|
||||
Reference in New Issue
Block a user