Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in ports_in_use on Windows #9

Open
MarkMc1089 opened this issue May 1, 2023 · 0 comments
Open

Bug in ports_in_use on Windows #9

MarkMc1089 opened this issue May 1, 2023 · 0 comments

Comments

@MarkMc1089
Copy link

There is a small bug in the code for ports_in_use, on Windows machines at least: https://github.com/stevecondylios/netstat/blob/master/R/ports_in_use.R#L30

local <- active_connections_table[, 4] # The 4th column is taken to use in getting the active ports

It should be the 3rd column, as can be seen from

names(parse_netstat(netstat()))
[1] "X" "Proto" "Local" "Address" "Foreign" "Address.1" "State"

I am not sure of 2 things. First, if this could be locale dependent. Second, whether this would affect non-Windows machines. I will put in a PR for the Windows side tho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant