diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d1c3622..ec45b012 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,7 +56,7 @@ jobs: git clone https://github.com/openresty/test-nginx.git test-nginx cd test-nginx && (sudo cpanm --notest . > build.log 2>&1 || (cat build.log && exit 1)) && cd .. - wget https://raw.githubusercontent.com/api7/apisix-build-tools/master/build-apisix-base.sh + wget https://raw.githubusercontent.com/api7/apisix-build-tools/refs/tags/apisix-base/1.21.4.2.2/build-apisix-base.sh chmod +x build-apisix-base.sh OR_PREFIX=$OPENRESTY_PREFIX ./build-apisix-base.sh latest diff --git a/lib/resty/etcd/v3.lua b/lib/resty/etcd/v3.lua index 756f1dbb..8c9b2572 100644 --- a/lib/resty/etcd/v3.lua +++ b/lib/resty/etcd/v3.lua @@ -507,7 +507,8 @@ function refresh_jwt_token(self, timeout) end if self.requesting_token then - self.sema:wait(timeout) + local wait_timeout = timeout or self.timeout or 0 + self.sema:wait(wait_timeout) if self.jwt_token and now() - self.last_auth_time < 60 * 3 + random(0, 60) then return true, nil end