Wait for network to shutdown cleanly when exiting. Otherwise we print a lot of errors about attempting to access a closed RocksDB storage. (#276)

Adrian Sutton 6 years ago committed by Lucas Saldanha
parent 03d278428c
commit f791760ac1
  1. 1
      pantheon/src/main/java/tech/pegasys/pantheon/Runner.java

@ -83,6 +83,7 @@ public class Runner implements AutoCloseable {
@Override @Override
public void close() throws Exception { public void close() throws Exception {
networkRunner.stop(); networkRunner.stop();
networkRunner.awaitStop();
exec.shutdown(); exec.shutdown();
try { try {
jsonRpc.ifPresent(service -> service.stop().join()); jsonRpc.ifPresent(service -> service.stop().join());

Loading…
Cancel
Save