Skip to content

Commit

Permalink
fix: fix a device not have ipv6 can't get ports in used (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
CorrectRoadH authored Nov 6, 2023
1 parent e9b5e43 commit de99fa6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils/port/port.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ func ListPortsInUse() ([]int, []int, error) {

file, err := os.Open(filename)
if err != nil {
return nil, nil, errors.New("Failed to open " + filename)
fmt.Println("Warning: ", err.Error())
continue
}
defer file.Close()

Expand Down

0 comments on commit de99fa6

Please sign in to comment.