From 4b890d0ada46b9891e99ecbc8604534005ca0d56 Mon Sep 17 00:00:00 2001 From: zhangshuang Date: Thu, 29 Apr 2021 00:09:10 +0800 Subject: [PATCH] fix jira 651, 652, update core and bft sub module --- core | 2 +- .../main/resources/scripts/peer-shutdown.sh | 36 +++++++++++-------- libs/bft-smart | 2 +- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/core b/core index 0ac57ded..8abe1393 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 0ac57dedb105b5db4f0020da54a66b667633b178 +Subproject commit 8abe13934b3ff50e405dffdd168b0910c901fef9 diff --git a/deploy/deploy-peer/src/main/resources/scripts/peer-shutdown.sh b/deploy/deploy-peer/src/main/resources/scripts/peer-shutdown.sh index cd4c21dc..70ed2ce0 100644 --- a/deploy/deploy-peer/src/main/resources/scripts/peer-shutdown.sh +++ b/deploy/deploy-peer/src/main/resources/scripts/peer-shutdown.sh @@ -41,23 +41,29 @@ checkpid() { #注意: 在shell编程中,"$?" 表示上一句命令或者一个函数的返回值 ################################### stop() { - checkpid - - if [[ $psid -ne 0 ]]; then - echo "Stopping Peer ......(pid=$psid) " - JAVA_CMD="kill -9 $psid" - sleep 1 - $JAVA_CMD - if [[ $? -eq 0 ]]; then - echo "[OK]" + checkpid + if [[ $psid -ne 0 ]]; then + echo "Stopping Peer ......(pid=$psid) " + JAVA_CMD="kill $psid" + sleep 1 + $JAVA_CMD + if [[ $? -eq 0 ]]; then + echo "[Kill OK]" + else + JAVA_CMD="kill -9 $psid" + sleep 3 + $JAVA_CMD + if [[ $? -eq 0 ]]; then + echo "[Kill -9 OK]" + else + echo "[failed]" + fi + fi else - echo "[Failed]" + echo "================================" + echo "WARN: Peer is not running" + echo "================================" fi - else - echo "================================" - echo "WARN: Peer is not running" - echo "================================" - fi } diff --git a/libs/bft-smart b/libs/bft-smart index 1f54435c..33bf1ef1 160000 --- a/libs/bft-smart +++ b/libs/bft-smart @@ -1 +1 @@ -Subproject commit 1f54435c5246f436db0a7d7ccae881e377dee53f +Subproject commit 33bf1ef172d5487590534cfdd2a80d1110ecbd4f