Skip to content

Commit

Permalink
Fix getting udp6 ports
Browse files Browse the repository at this point in the history
  • Loading branch information
mshsmlv committed Nov 4, 2020
1 parent a1e7747 commit 860f332
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net/net_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion v3/net/net_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 860f332

Please sign in to comment.