summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2015-12-17 14:53:21 -0800
committerRider Linden <rider@lindenlab.com>2015-12-17 14:53:21 -0800
commit6851dd30cae7c748f4fc953de268f7989787501c (patch)
treeec4cc48b6f7ea7000069bc7a780de9ea1f1f47d8 /indra
parent2c9097aa28d65eeddcfb60b9ac93495723ed6419 (diff)
MAINT-5977: Check get_consuming() as well as listener return when draining queue.
Diffstat (limited to 'indra')
-rwxr-xr-xindra/llcommon/llevents.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp
index fc2d8d5e23..0c5e55dc76 100755
--- a/indra/llcommon/llevents.cpp
+++ b/indra/llcommon/llevents.cpp
@@ -57,6 +57,7 @@
#include "stringize.h"
#include "llerror.h"
#include "llsdutil.h"
+#include "llcoros.h"
#if LL_MSVC
#pragma warning (disable : 4702)
#endif
@@ -512,7 +513,10 @@ bool LLEventStream::post(const LLSD& event)
*****************************************************************************/
bool LLEventMailDrop::post(const LLSD& event)
{
- bool posted = LLEventStream::post(event);
+ bool posted = false;
+
+ if (!mSignal->empty())
+ posted = LLEventStream::post(event);
if (!posted)
{ // if the event was not handled we will save it for later so that it can
@@ -530,7 +534,7 @@ LLBoundListener LLEventMailDrop::listen_impl(const std::string& name,
{
if (!mEventHistory.empty())
{
- if (listener(mEventHistory.front()))
+ if (listener(mEventHistory.front()) || LLCoros::get_consuming())
{
mEventHistory.pop_front();
}