Skip to content

Commit

Permalink
Hotfix: port numbers not fitting in an int16
Browse files Browse the repository at this point in the history
The ideal solution would be to use uint16, however, that will require a bigger amount of change to adjust all types. Int32 should so.

Signed-off-by: Saed SayedAhmed <[email protected]>
  • Loading branch information
saedx1 authored Jan 3, 2025
1 parent 93eec0d commit 7f83b5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/configs/parsing_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func ParsePortList(s string) ([]int, error) {
}

func parsePort(value string) (int, error) {
port, err := strconv.ParseInt(value, 10, 16)
port, err := strconv.ParseInt(value, 10, 32)
if err != nil {
return 0, fmt.Errorf("unable to parse port as integer: %w", err)
}
Expand Down

0 comments on commit 7f83b5d

Please sign in to comment.