This is an automated email from the ASF dual-hosted git repository.

iluo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git


The following commit(s) were added to refs/heads/master by this push:
     new 5d7b25a  [Dubbo-936]fix The nc command is unstable in the dubbo 
startup script #936 (#3375)
5d7b25a is described below

commit 5d7b25a22cdf0f4d60dce445f454014a62bd71ee
Author: huazhongming <[email protected]>
AuthorDate: Thu Jan 31 14:06:24 2019 +0800

    [Dubbo-936]fix The nc command is unstable in the dubbo startup script #936 
(#3375)
    
    * fix dubbo启动脚本中nc命令不稳定 #936
    
    * modify
---
 .../src/main/resources/META-INF/assembly/bin/start.sh                   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/dubbo-container/dubbo-container-api/src/main/resources/META-INF/assembly/bin/start.sh
 
b/dubbo-container/dubbo-container-api/src/main/resources/META-INF/assembly/bin/start.sh
index 595b769..56e3914 100755
--- 
a/dubbo-container/dubbo-container-api/src/main/resources/META-INF/assembly/bin/start.sh
+++ 
b/dubbo-container/dubbo-container-api/src/main/resources/META-INF/assembly/bin/start.sh
@@ -90,7 +90,7 @@ while [ $COUNT -lt 1 ]; do
     sleep 1 
     if [ -n "$SERVER_PORT" ]; then
         if [ "$SERVER_PROTOCOL" == "dubbo" ]; then
-           COUNT=`echo status | nc -i 1 $SERVER_HOST $SERVER_PORT | grep -c OK`
+           COUNT=`(sleep 1; echo -e '\n'; sleep 1; echo status; sleep 1)| 
telnet $SERVER_HOST $SERVER_PORT | grep -c OK`
         else
             COUNT=`netstat -an | grep $SERVER_PORT | wc -l`
         fi

Reply via email to