Browse Source

curl timeout

qiaofeng1227 2 years ago
parent
commit
0015b03769
2 changed files with 2 additions and 2 deletions
  1. 1 1
      install/install.sh
  2. 1 1
      install/update.sh

+ 1 - 1
install/install.sh

@@ -322,7 +322,7 @@ function fastest_url() {
   fastest_time=0
 
   for url in "${urls[@]}"; do
-    if curl --output /dev/null --silent --head --fail "$url"; then
+    if curl --output /dev/null --silent --head --fail --max-time 3 "$url"; then
         data="url is available"
     else
         continue

+ 1 - 1
install/update.sh

@@ -77,7 +77,7 @@ function fastest_url() {
   fastest_time=0
 
   for url in "${urls[@]}"; do
-    if curl --output /dev/null --silent --head --fail "$url"; then
+    if curl --output /dev/null --silent --head --fail --max-time 3 "$url"; then
         data="url is available"
     else
         continue