Skip to content

Commit c07e4d3

Browse files
author
hastmu
committed
only show cache age if there is a cache
1 parent 1cb152a commit c07e4d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apt-proxy-detect.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,12 @@ then
123123
else
124124
debug "CACHE" "using stored under: ${cache_file}"
125125
fi
126+
126127
cache_age=$(( now - ${CACHED_PROXIES_AGE[${testurl_hash}]:=0} ))
127-
debug "CACHE-AGE" "age: ${cache_age} sec"
128128
proxy="${CACHED_PROXIES[${testurl_hash}]}"
129129
if [ -n "${proxy}" ]
130130
then
131+
debug "CACHE-AGE" "age: ${cache_age} sec"
131132
if check_proxy "${proxy}" "${testurl}"
132133
then
133134
debug "WORKS" "give back cached proxy"

0 commit comments

Comments
 (0)