From c43939e1b78c3c7d57a1830a8e6361f8c41fa9de Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Thu, 6 Jun 2019 13:45:31 -0700 Subject: [PATCH] fullnode.rs: restart the node correctly on non-zero exit --- multinode-demo/fullnode.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/multinode-demo/fullnode.sh b/multinode-demo/fullnode.sh index a670287591..2f388b3f1a 100755 --- a/multinode-demo/fullnode.sh +++ b/multinode-demo/fullnode.sh @@ -412,14 +412,16 @@ while true; do fi if [[ $node_type = bootstrap_leader ]]; then - wait "$pid" + wait "$pid" || true + echo "############## $node_type exited, restarting ##############" sleep 1 else secs_to_next_genesis_poll=1 while true; do if ! kill -0 "$pid"; then - wait "$pid" - exit 0 + wait "$pid" || true + echo "############## $node_type exited, restarting ##############" + break fi sleep 1