diff --git a/net/net_windows.go b/net/net_windows.go index 629fdfc..bdc9287 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 f43f503..691d019 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)