mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-23 17:40:35 +08:00
curl timeout
This commit is contained in:
parent
60d45e7b51
commit
0015b03769
@ -322,7 +322,7 @@ function fastest_url() {
|
|||||||
fastest_time=0
|
fastest_time=0
|
||||||
|
|
||||||
for url in "${urls[@]}"; do
|
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"
|
data="url is available"
|
||||||
else
|
else
|
||||||
continue
|
continue
|
||||||
|
@ -77,7 +77,7 @@ function fastest_url() {
|
|||||||
fastest_time=0
|
fastest_time=0
|
||||||
|
|
||||||
for url in "${urls[@]}"; do
|
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"
|
data="url is available"
|
||||||
else
|
else
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user