Skip to content

Commit

Permalink
fix wrong condition check
Browse files Browse the repository at this point in the history
  • Loading branch information
shmuto committed Dec 9, 2022
1 parent 694ac2d commit 07401dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func LoadConfigFromFile(filename string) (map[string]Config, error) {

func (c Config) Validate() error {
// TWAMP control port range should be in 1 to 65535
if 65535 < c.ControlPort && c.ControlPort < 1 {
if 65535 < c.ControlPort || c.ControlPort < 1 {
return errors.New("the value of [ControlPort] must be between 1 and 65535")
}

Expand Down

0 comments on commit 07401dd

Please sign in to comment.