diff --git a/cmd/minimal-download/main.go b/cmd/minimal-download/main.go index 605fd93..a8a1a00 100644 --- a/cmd/minimal-download/main.go +++ b/cmd/minimal-download/main.go @@ -325,6 +325,10 @@ outer: func main() { flag.Parse() + if *flagStreams < 1 || *flagStreams > 4 { + log.Fatal("Invalid configuration: the number of streams must be between 1 and 4.") + } + ctx, cancel := context.WithTimeout(context.Background(), *flagMaxDuration) defer cancel() diff --git a/cmd/msak-client/client.go b/cmd/msak-client/client.go index 2f65ebb..ebc0557 100644 --- a/cmd/msak-client/client.go +++ b/cmd/msak-client/client.go @@ -38,6 +38,10 @@ func main() { log.Fatal("Invalid configuration: please check streams, delay and duration and make sure they make sense.") } + if *flagStreams < 1 || *flagStreams > 4 { + log.Fatal("Invalid configuration: the number of streams must be between 1 and 4.") + } + config := client.Config{ Server: *flagServer, Scheme: *flagScheme,