diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-04-10 16:43:00 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-04-10 16:43:00 -0400 |
commit | 5ce6c02ab3db983c7c876e5a41550bd94e53d0a7 (patch) | |
tree | f4d603b958ff769376246488a0a2965aabd12334 /indra/newview/scripts/lua/leap.lua | |
parent | e6aa6d22a107161b0bf08a45e9a90e749a824d9b (diff) | |
parent | 7f9723bd5e05ea5318a56466578467f2755a6f4b (diff) |
Merge branch 'release/luau-scripting' into lua-terminate-script
Diffstat (limited to 'indra/newview/scripts/lua/leap.lua')
-rw-r--r-- | indra/newview/scripts/lua/leap.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/scripts/lua/leap.lua b/indra/newview/scripts/lua/leap.lua index d19273e8bc..ade91789f0 100644 --- a/indra/newview/scripts/lua/leap.lua +++ b/indra/newview/scripts/lua/leap.lua @@ -183,14 +183,15 @@ function leap.generate(pump, data, checklast) -- bearing that reqid. Stamp the outbound request with that reqid, and -- send it. local reqid, waitfor = requestSetup(pump, data) - local ok, response + local ok, response, resumed_with repeat ok, response = pcall(waitfor.wait, waitfor) if not ok then break end - coroutine.yield(response) - until checklast and checklast(response) + -- can resume(false) to terminate generate() and clean up + resumed_with = coroutine.yield(response) + until (checklast and checklast(response)) or (resumed_with == false) -- If we break the above loop, whether or not due to error, clean up. pending[reqid] = nil if not ok then |