diff options
author | Rick Pasetto <rick@lindenlab.com> | 2009-10-13 20:52:04 -0700 |
---|---|---|
committer | Rick Pasetto <rick@lindenlab.com> | 2009-10-13 20:52:04 -0700 |
commit | 4598a4a621635be9d507534f613d3768edcb62ec (patch) | |
tree | 8676809f6e370c92af1fc5e988883c85bfd81f69 | |
parent | a20933410a959cecf1b6a2c7c44f5fe4f7c87844 (diff) |
Another attempt at fixing unit test, this one is weirder.
Don't schedule the queue timer in the tick() of the retry timer.
Instead, schedule it in the RetryTimer's destructor.
This is an artifact of how the LLEventTimer's loop is handled.
-rw-r--r-- | indra/newview/llmediadataclient.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp index 255f6d1f84..f797f15865 100644 --- a/indra/newview/llmediadataclient.cpp +++ b/indra/newview/llmediadataclient.cpp @@ -182,15 +182,20 @@ LLMediaDataClient::Responder::RetryTimer::RetryTimer(F32 time, Responder *mdr) LLMediaDataClient::Responder::RetryTimer::~RetryTimer() { LL_DEBUGS("LLMediaDataClient") << "~RetryTimer" << *(mResponder->getRequest()) << LL_ENDL; + + // XXX This is weird: Instead of doing the work in tick() (which re-schedules + // a timer, which might be risky), do it here, in the destructor. Yes, it is very odd. + // Instead of retrying, we just put the request back onto the queue + LL_INFOS("LLMediaDataClient") << "RetryTimer fired for: " << *(mResponder->getRequest()) << "retrying" << LL_ENDL; + mResponder->getRequest()->reEnqueue(); + + // Release the ref to the responder. mResponder = NULL; } // virtual BOOL LLMediaDataClient::Responder::RetryTimer::tick() { - // Instead of retrying, we just put the request back onto the queue - LL_INFOS("LLMediaDataClient") << "RetryTimer fired for: " << *(mResponder->getRequest()) << "retrying" << LL_ENDL; - mResponder->getRequest()->reEnqueue(); // Don't fire again return TRUE; } |