Skip to content

Commit 5d7b25a

Browse files
CrazyHZMbeiwei30
authored andcommitted
[Dubbo-936]fix The nc command is unstable in the dubbo startup script #936 (#3375)
* fix dubbo启动脚本中nc命令不稳定 #936 * modify
1 parent 2a91684 commit 5d7b25a

File tree

1 file changed

+1
-1
lines changed
  • dubbo-container/dubbo-container-api/src/main/resources/META-INF/assembly/bin

1 file changed

+1
-1
lines changed

dubbo-container/dubbo-container-api/src/main/resources/META-INF/assembly/bin/start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ while [ $COUNT -lt 1 ]; do
9090
sleep 1
9191
if [ -n "$SERVER_PORT" ]; then
9292
if [ "$SERVER_PROTOCOL" == "dubbo" ]; then
93-
COUNT=`echo status | nc -i 1 $SERVER_HOST $SERVER_PORT | grep -c OK`
93+
COUNT=`(sleep 1; echo -e '\n'; sleep 1; echo status; sleep 1)| telnet $SERVER_HOST $SERVER_PORT | grep -c OK`
9494
else
9595
COUNT=`netstat -an | grep $SERVER_PORT | wc -l`
9696
fi

0 commit comments

Comments
 (0)