Skip to content

Commit

Permalink
[Dubbo-936]fix The nc command is unstable in the dubbo startup script #…
Browse files Browse the repository at this point in the history
…936 (#3375)

* fix dubbo启动脚本中nc命令不稳定 #936

* modify
  • Loading branch information
CrazyHZM authored and beiwei30 committed Jan 31, 2019
1 parent 2a91684 commit 5d7b25a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5d7b25a

Please sign in to comment.