summaryrefslogtreecommitdiff
path: root/indra/llcommon/lualistener.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/lualistener.cpp')
-rw-r--r--indra/llcommon/lualistener.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/indra/llcommon/lualistener.cpp b/indra/llcommon/lualistener.cpp
index d4bd73a9fb..5c4989e891 100644
--- a/indra/llcommon/lualistener.cpp
+++ b/indra/llcommon/lualistener.cpp
@@ -38,21 +38,16 @@ LuaListener::LuaListener(lua_State* L):
"LuaListener",
[this](const std::string& pump, const LLSD& data)
{ return queueEvent(pump, data); })),
- // Listen for shutdown events on the "LLApp" LLEventPump.
+ // Listen for shutdown events.
mShutdownConnection(
- LLEventPumps::instance().obtain("LLLua").listen(
- LLEventPump::inventName("LuaState"),
- [this](const LLSD& status)
+ LLCoros::getStopListener(
+ "LuaState",
+ mCoroName,
+ [this](const LLSD&)
{
- auto coro_name = status["coro"].asString();
- auto statsd = status["status"].asString();
- if ((statsd == "close_all") || ((statsd == "close") && (coro_name == mCoroName)))
- {
- // If a Lua script is still blocked in getNext() during
- // viewer shutdown, close the queue to wake up getNext().
- mQueue.close();
- }
- return false;
+ // If a Lua script is still blocked in getNext() during
+ // viewer shutdown, close the queue to wake up getNext().
+ mQueue.close();
}))
{}