diff options
| author | Rider Linden <rider@lindenlab.com> | 2015-10-14 17:46:24 -0700 |
|---|---|---|
| committer | Rider Linden <rider@lindenlab.com> | 2015-10-14 17:46:24 -0700 |
| commit | bbb9d4f21b018bfffc41f790aab7b54975504027 (patch) | |
| tree | 4c81cfc2348dd98a4a157979afc854568da4caea /indra/newview/lleventpoll.cpp | |
| parent | 53b947e0397d6b88fdc6c0a10144e5a6d02a67d3 (diff) | |
MAINT-5732: Change to the way event polling handles error conditions and cancel calls.
Refactor any remaining LLCore::HTTPHandlers to use boost::shared_ptr
Started minor refactor in the materials manager into coroutines (unfinished)
Diffstat (limited to 'indra/newview/lleventpoll.cpp')
| -rwxr-xr-x | indra/newview/lleventpoll.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp index 021d17251d..40eaba2bac 100755 --- a/indra/newview/lleventpoll.cpp +++ b/indra/newview/lleventpoll.cpp @@ -120,15 +120,19 @@ namespace Details void LLEventPollImpl::stop() { - LL_INFOS() << "requesting stop for event poll coroutine <" << mCounter << ">" << LL_ENDL; mDone = true; LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t adapter = mAdapter.lock(); if (adapter) { + LL_INFOS() << "requesting stop for event poll coroutine <" << mCounter << ">" << LL_ENDL; // cancel the yielding operation if any. adapter->cancelSuspendedOperation(); } + else + { + LL_INFOS() << "Coroutine for poll <" << mCounter << "> previously stopped. No action taken." << LL_ENDL; + } } void LLEventPollImpl::eventPollCoro(std::string url) @@ -179,6 +183,12 @@ namespace Details LL_WARNS() << "Canceling coroutine" << LL_ENDL; break; } + else if (!status.isHttpStatus()) + { + /// Some LLCore or LIBCurl error was returned. This is unlikely to be recoverable + LL_WARNS("LLEventPollImpl") << "Critical error from poll request returned from libraries. Canceling coroutine." << LL_ENDL; + break; + } LL_WARNS("LLEventPollImpl") << "<" << counter << "> Error result from LLCoreHttpUtil::HttpCoroHandler. Code " << status.toTerseString() << ": '" << httpResults["message"] << "'" << LL_ENDL; |
