From b45ccbcfadece0a87fda7019893061d1543e3c4d Mon Sep 17 00:00:00 2001 From: Reonaydo Date: Tue, 11 Apr 2017 17:28:02 +0800 Subject: [PATCH 1/2] Added default timeout for _get --- acme.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/acme.sh b/acme.sh index f434f685..783c1383 100755 --- a/acme.sh +++ b/acme.sh @@ -98,6 +98,8 @@ _PREPARE_LINK="https://github.com/Neilpang/acme.sh/wiki/Install-preparations" _STATELESS_WIKI="https://github.com/Neilpang/acme.sh/wiki/Stateless-Mode" +DEFAULT_TIMEOUT=60 + __INTERACTIVE="" if [ -t 1 ]; then __INTERACTIVE="1" @@ -1591,6 +1593,10 @@ _get() { url="$1" onlyheader="$2" t="$3" + if [ -z "$t" ]; then + # Set default timeout + t=$DEFAULT_TIMEOUT + fi _debug url "$url" _debug "timeout" "$t" From 4b667c4063e273ee1c9349792f6be6f836cfad83 Mon Sep 17 00:00:00 2001 From: Leonid Popov Date: Tue, 11 Apr 2017 18:16:48 +0800 Subject: [PATCH 2/2] Fix ident --- acme.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acme.sh b/acme.sh index 783c1383..18891e5c 100755 --- a/acme.sh +++ b/acme.sh @@ -1594,8 +1594,8 @@ _get() { onlyheader="$2" t="$3" if [ -z "$t" ]; then - # Set default timeout - t=$DEFAULT_TIMEOUT + # Set default timeout + t=$DEFAULT_TIMEOUT fi _debug url "$url" _debug "timeout" "$t"