diff options
author | Rider Linden <none@none> | 2015-04-08 15:54:34 -0700 |
---|---|---|
committer | Rider Linden <none@none> | 2015-04-08 15:54:34 -0700 |
commit | 9965e13e83e30065ba01f936153d9a82326f1685 (patch) | |
tree | fcf4ef5a2941ae04cf980d5ef2803813c154c47b | |
parent | 93382ee0c0c570e58b17af5f43f9738d773e8add (diff) |
Added timeout on failure.
-rwxr-xr-x | indra/newview/lleventpoll.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp index 625bbfae0c..bf07e1b4ab 100755 --- a/indra/newview/lleventpoll.cpp +++ b/indra/newview/lleventpoll.cpp @@ -40,6 +40,7 @@ #include "llcoros.h" #include "lleventcoro.h" #include "llcorehttputil.h" +#include "lleventfilter.h" namespace LLEventPolling { @@ -164,8 +165,7 @@ namespace Details errorCount = 0; continue; } - - if ((status == LLCore::HttpStatus(LLCore::HttpStatus::LLCORE, LLCore::HE_OP_CANCELED)) || + else if ((status == LLCore::HttpStatus(LLCore::HttpStatus::LLCORE, LLCore::HE_OP_CANCELED)) || (status == LLCore::HttpStatus(HTTP_NOT_FOUND))) { LL_WARNS() << "Canceling coroutine" << LL_ENDL; @@ -178,16 +178,18 @@ namespace Details { ++errorCount; - // The 'tick' will return TRUE causing the timer to delete this. int waitToRetry = EVENT_POLL_ERROR_RETRY_SECONDS + errorCount * EVENT_POLL_ERROR_RETRY_SECONDS_INC; - LL_WARNS() << "Retrying in " << waitToRetry << - " seconds, error count is now " << errorCount << LL_ENDL; - - // *TODO: Wait for a timeout here - // new LLEventPollEventTimer( - // , this); + { + LL_WARNS() << "<" << counter << "> Retrying in " << waitToRetry << + " seconds, error count is now " << errorCount << LL_ENDL; + LLEventTimeout timeout; + timeout.eventAfter(waitToRetry, LLSD()); + waitForEventOn(self, timeout); + } + if (mDone) + break; continue; } else |