fullnode.rs: restart the node correctly on non-zero exit

This commit is contained in:
Michael Vines 2019-06-06 13:45:31 -07:00
parent ead947e710
commit 2ae595294c
No known key found for this signature in database
GPG Key ID: 33F4FDEC4E0E88BD
1 changed files with 5 additions and 3 deletions

View File

@ -423,14 +423,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