diff --git a/net/net_windows.go b/net/net_windows.go index 629fdfc7c..bdc928798 100644 --- a/net/net_windows.go +++ b/net/net_windows.go @@ -547,7 +547,7 @@ func getUDPConnections(family uint32) ([]ConnectionStat, error) { mibs := (*mibUDPRowOwnerPid)(unsafe.Pointer(&buf[index])) ns := mibs.convertToConnectionStat() stats = append(stats, ns) - case kindUDP4.family: + case kindUDP6.family: mibs := (*mibUDP6RowOwnerPid)(unsafe.Pointer(&buf[index])) ns := mibs.convertToConnectionStat() stats = append(stats, ns) diff --git a/v3/net/net_windows.go b/v3/net/net_windows.go index f43f50301..691d01914 100644 --- a/v3/net/net_windows.go +++ b/v3/net/net_windows.go @@ -547,7 +547,7 @@ func getUDPConnections(family uint32) ([]ConnectionStat, error) { mibs := (*mibUDPRowOwnerPid)(unsafe.Pointer(&buf[index])) ns := mibs.convertToConnectionStat() stats = append(stats, ns) - case kindUDP4.family: + case kindUDP6.family: mibs := (*mibUDP6RowOwnerPid)(unsafe.Pointer(&buf[index])) ns := mibs.convertToConnectionStat() stats = append(stats, ns)