summaryrefslogtreecommitdiff
path: root/indra/newview/scripts/lua/leap.lua
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/scripts/lua/leap.lua')
-rw-r--r--indra/newview/scripts/lua/leap.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/scripts/lua/leap.lua b/indra/newview/scripts/lua/leap.lua
index 60e8266a76..77f3a3e116 100644
--- a/indra/newview/scripts/lua/leap.lua
+++ b/indra/newview/scripts/lua/leap.lua
@@ -198,10 +198,10 @@ end
local function cleanup(message)
-- we're done: clean up all pending coroutines
for i, waitfor in pairs(leap._pending) do
- waitfor:exception(message)
+ waitfor:close()
end
for i, waitfor in pairs(leap._waitfors) do
- waitfor:exception(message)
+ waitfor:close()
end
end
@@ -407,6 +407,11 @@ function leap.WaitFor:process(item)
self._queue:Enqueue(item)
end
+-- called by cleanup() at end
+function leap.WaitFor:close()
+ self._queue:close()
+end
+
-- called by leap.process() when get_event_next() raises an error
function leap.WaitFor:exception(message)
print_warning(self.name .. ' error: ' .. message)