From 592b6a785e415513e0d1c663178752ec9c89ff8d Mon Sep 17 00:00:00 2001 From: yaling888 <73897884+yaling888@users.noreply.github.com> Date: Wed, 23 Feb 2022 14:04:47 +0800 Subject: [PATCH] Fix: find process name by UDP network on macOS --- component/process/process_darwin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/component/process/process_darwin.go b/component/process/process_darwin.go index 7e4baf74..a484c78d 100644 --- a/component/process/process_darwin.go +++ b/component/process/process_darwin.go @@ -70,7 +70,7 @@ func findProcessName(network string, ip net.IP, port int) (string, error) { continue } - if !ip.Equal(srcIP) { + if !ip.Equal(srcIP) && (network == TCP || !srcIP.IsUnspecified()) { continue }