diff options
author | Merov Linden <merov@lindenlab.com> | 2012-04-13 17:20:53 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-04-13 17:20:53 -0700 |
commit | adf5b5c1efaed30dc043652b174d76c9088f4b18 (patch) | |
tree | 7ebd44c36f7777413406b4043ab436b492600e02 /indra/newview/lltexturefetch.cpp | |
parent | 8778010feec5193c5ffc88d70e4a303aebaaaee4 (diff) | |
parent | 8b3703bd03487e6d70a793427ed1587b1cd86808 (diff) |
Final pull from viewer-thx1138
Diffstat (limited to 'indra/newview/lltexturefetch.cpp')
-rwxr-xr-x | indra/newview/lltexturefetch.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 5cc8de3d91..2e1b409fa7 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -846,6 +846,8 @@ void LLTextureFetchWorker::startWork(S32 param) // Called from LLWorkerThread::processRequest() bool LLTextureFetchWorker::doWork(S32 param) { + static const F32 FETCHING_TIMEOUT = 120.f;//seconds + LLMutexLock lock(&mWorkMutex); if ((mFetcher->isQuitting() || getFlags(LLWorkerClass::WCF_DELETE_REQUESTED))) @@ -1152,7 +1154,7 @@ bool LLTextureFetchWorker::doWork(S32 param) //1, not openning too many file descriptors at the same time; //2, control the traffic of http so udp gets bandwidth. // - static const S32 MAX_NUM_OF_HTTP_REQUESTS_IN_QUEUE = 8 ; + static const S32 MAX_NUM_OF_HTTP_REQUESTS_IN_QUEUE = 24 ; if(mFetcher->getNumHTTPRequests() > MAX_NUM_OF_HTTP_REQUESTS_IN_QUEUE) { return false ; //wait. @@ -1188,6 +1190,8 @@ bool LLTextureFetchWorker::doWork(S32 param) bool res = false; if (!mUrl.empty()) { + mRequestedTimer.reset(); + mLoaded = FALSE; mGetStatus = 0; mGetReason.clear(); @@ -1346,6 +1350,13 @@ bool LLTextureFetchWorker::doWork(S32 param) } else { + if(FETCHING_TIMEOUT < mRequestedTimer.getElapsedTimeF32()) + { + //timeout, abort. + mState = DONE; + return true; + } + setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); return false; } |