mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-03-10 09:20:04 +01:00
ForwardingService: let main() throw InterruptedException
This simplifies main() and increases readability.
This commit is contained in:
parent
a224bbed81
commit
cff6459b4e
1 changed files with 2 additions and 4 deletions
|
@ -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…
Add table
Reference in a new issue