提交 2219b0a2 编写于 作者: J Jason Song 提交者: GitHub

Merge pull request #478 from nobodyiam/fix-start-up-sh

add max-time option to avoid unexpected hang
......@@ -66,7 +66,7 @@ declare -i max_counter=16 # 16*5=80s
declare -i total_time=0
printf "Waiting for server startup" >> $STARTUP_LOG
until [[ (( counter -ge max_counter )) || "$(curl -X GET --silent --connect-timeout 1 --head $SERVER_URL | grep "Coyote")" != "" ]];
until [[ (( counter -ge max_counter )) || "$(curl -X GET --silent --connect-timeout 1 --max-time 2 --head $SERVER_URL | grep "Coyote")" != "" ]];
do
printf "." >> $STARTUP_LOG
counter+=1
......
......@@ -66,7 +66,7 @@ declare -i max_counter=16 # 16*5=80s
declare -i total_time=0
printf "Waiting for server startup" >> $STARTUP_LOG
until [[ (( counter -ge max_counter )) || "$(curl -X GET --silent --connect-timeout 1 --head $SERVER_URL | grep "Coyote")" != "" ]];
until [[ (( counter -ge max_counter )) || "$(curl -X GET --silent --connect-timeout 1 --max-time 2 --head $SERVER_URL | grep "Coyote")" != "" ]];
do
printf "." >> $STARTUP_LOG
counter+=1
......
......@@ -66,7 +66,7 @@ declare -i max_counter=16 # 16*5=80s
declare -i total_time=0
printf "Waiting for server startup" >> $STARTUP_LOG
until [[ (( counter -ge max_counter )) || "$(curl -X GET --silent --connect-timeout 1 --head $SERVER_URL | grep "Coyote")" != "" ]];
until [[ (( counter -ge max_counter )) || "$(curl -X GET --silent --connect-timeout 1 --max-time 2 --head $SERVER_URL | grep "Coyote")" != "" ]];
do
printf "." >> $STARTUP_LOG
counter+=1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册