Skip to content

Process.Name or Process.Pid can not be filtered #12

Open
@championwang2020

Description

@championwang2020

The following code will throw panic:
"tabs, err := netstat.TCPSocks(func(s *netstat.SockTabEntry) bool {
return s.Process.Pid == 6720
})" or
"tabs, err := netstat.TCPSocks(func(s *netstat.SockTabEntry) bool {
return s.Process.Pname == "chrome"
})"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x511799]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions