Skip to content

Commit

Permalink
force kill of "docker exec" used for testing bitcoind shutdown if com…
Browse files Browse the repository at this point in the history
…mand hangs more than 12s.
  • Loading branch information
kenshin-samourai committed Jan 15, 2020
1 parent bd43526 commit 3ee85db
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions docker/my-dojo/dojo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ stop() {
do
echo "Waiting for shutdown of Bitcoin server."
# Check if bitcoind rpc api is responding
timeout 5 docker exec -it bitcoind bitcoin-cli \
timeout -k 12 10 docker exec -it bitcoind bitcoin-cli \
-rpcconnect=bitcoind \
--rpcport=28256 \
--rpcuser="$BITCOIND_RPC_USER" \
Expand All @@ -100,8 +100,6 @@ stop() {
echo "Bitcoin server stopped."
break
fi
# Pause before next try
sleep 5
i=$[$i+1]
done
# Bitcoin daemon is still up
Expand Down

0 comments on commit 3ee85db

Please sign in to comment.