mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-01-18 05:12:30 +01:00
ForwardingService: let main() throw InterruptedException
This simplifies main() and increases readability.
This commit is contained in:
parent
a224bbed81
commit
cff6459b4e
@ -56,7 +56,7 @@ public class ForwardingService implements Closeable {
|
||||
* Run the forwarding service as a command line tool
|
||||
* @param args See {@link #USAGE}
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
// This line makes the log output more compact and easily read, especially when using the JDK log adapter.
|
||||
BriefLogFormatter.init();
|
||||
Context.propagate(new Context());
|
||||
@ -70,9 +70,7 @@ public class ForwardingService implements Closeable {
|
||||
try (ForwardingService forwardingService = new ForwardingService(args)) {
|
||||
forwardingService.run();
|
||||
// Wait for Control-C
|
||||
try {
|
||||
Thread.sleep(Long.MAX_VALUE);
|
||||
} catch (InterruptedException ignored) {}
|
||||
Thread.sleep(Long.MAX_VALUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user