From f791760ac13cfcd9f4f3fd1643f543e9c3ce8ce8 Mon Sep 17 00:00:00 2001 From: Adrian Sutton Date: Mon, 19 Nov 2018 11:26:16 +1000 Subject: [PATCH] Wait for network to shutdown cleanly when exiting. Otherwise we print a lot of errors about attempting to access a closed RocksDB storage. (#276) --- pantheon/src/main/java/tech/pegasys/pantheon/Runner.java | 1 + 1 file changed, 1 insertion(+) diff --git a/pantheon/src/main/java/tech/pegasys/pantheon/Runner.java b/pantheon/src/main/java/tech/pegasys/pantheon/Runner.java index 83a4707652..662aee5868 100644 --- a/pantheon/src/main/java/tech/pegasys/pantheon/Runner.java +++ b/pantheon/src/main/java/tech/pegasys/pantheon/Runner.java @@ -83,6 +83,7 @@ public class Runner implements AutoCloseable { @Override public void close() throws Exception { networkRunner.stop(); + networkRunner.awaitStop(); exec.shutdown(); try { jsonRpc.ifPresent(service -> service.stop().join());