ForwardingService: return error code 1 on bad command line usage

This commit is contained in:
Andreas Schildbach 2023-03-27 21:57:04 +02:00
parent 49290a8ce0
commit 8f504d3795

View file

@ -61,9 +61,9 @@ public class ForwardingService implements Closeable {
BriefLogFormatter.init();
Context.propagate(new Context());
if (args.length < 1) {
if (args.length < 1 || args.length > 2) {
System.err.println(USAGE);
throw new IllegalArgumentException("Address required");
System.exit(1);
}
// Figure out which network we should connect to. Each network gets its own set of files.