Skip to content

Commit 768356a

Browse files
authored
chore: alert if less than two ports Fixes #1041
1 parent 8cef957 commit 768356a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/cli/cli.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,9 @@ func relay(c *cli.Context) (err error) {
799799
ports[i] = strconv.Itoa(portString + i)
800800
}
801801
}
802+
if len(ports) < 2 {
803+
return fmt.Errorf("relay requires at least two ports; specify --ports with two or more ports or set --transfers to 2+")
804+
}
802805

803806
tcpPorts := strings.Join(ports[1:], ",")
804807
for i, port := range ports {

0 commit comments

Comments
 (0)