You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
localfunctioncall_url1(url)
-- long pull-- Blocking request, increase timeout-- https://www.consul.io/api/index.html#blocking-querieslocalc=http.new()
-- call the urlendlocalfunctioncall_url2(url)
-- long pull-- Blocking request, increase timeout-- https://www.consul.io/api/index.html#blocking-querieslocalc=http.new()
-- call the urlendfunction_M.connect(premature)
ifprematurethenreturnendlocalurl1_thread, url1_err=ngx.thread.spawn(call_url1, url1)
ifnoturl1_threadthenlog.error("spawn url1 thread error")
returnendlocalurl2_thread, url2_err=ngx.thread.spawn(call_url2, url2)
ifnoturl2_threadthenlog.error("spawn url2 thread error")
returnendlocalthread_wait_ok, wait_res=ngx.thread.wait(url1_thread, url2_thread)
ngx.thread.kill(url1_thread)
ngx.thread.kill(url2_thread)
ifnotthread_wait_okthenlog.error("failed to wait thread: ", err, ", wait_res: ", wait_res)
returnendlocalc3=http.new()
-- call other url and got exception here-- short pullend
Ensure you have provided the following details while reporting a problem:
The exact version of the related software, including but not limited to the OpenResty version
(if any), the NGINX core version, the ngx_lua module version,
nginx version: openresty/1.21.4.1
The text was updated successfully, but these errors were encountered:
ERROR Stacks:
Here is the code snippet:
Ensure you have provided the following details while reporting a problem:
(if any), the NGINX core version, the
ngx_lua
module version,The text was updated successfully, but these errors were encountered: