summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2012-07-11 16:09:07 -0600
committerXiaohong Bao <bao@lindenlab.com>2012-07-11 16:09:07 -0600
commit0cbeee19d79978ea143804737633dcb5afc8af9c (patch)
treefe34cf800c3d41c01f4fda74bba7495e28d2ba00
parent82dbdfea7056bbc7bdf7bff283abd8f2b61420c5 (diff)
fix for SH-3137: delay to issue new http fetching requests if http connection failure happens
-rwxr-xr-xindra/newview/lltexturefetch.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 09754fc5c0..b148b8b76d 100755
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -1276,6 +1276,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
mState = INIT ;
mCanUseHTTP = false ;
+ mUrl.clear();
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
return false ;
}
@@ -1304,6 +1305,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mHTTPFailCount >= max_attempts)
{
+ mUrl.clear();
if (cur_size > 0)
{
// Use available data
@@ -1327,6 +1329,14 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
}
+ // Clear the url since we're done with the fetch
+ // Note: mUrl is used to check is fetching is required so failure to clear it will force an http fetch
+ // next time the texture is requested, even if the data have already been fetched.
+ if(mWriteToCacheState != NOT_WRITE)
+ {
+ mUrl.clear();
+ }
+
llassert_always(mBufferSize == cur_size + mRequestedSize);
if(!mBufferSize)//no data received.
{
@@ -1753,13 +1763,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(const LLChannelDescriptors& channels,
{
mRequestedSize = -1; // error
}
- // Clear the url since we're done with the fetch
- // Note: mUrl is used to check is fetching is required so failure to clear it will force an http fetch
- // next time the texture is requested, even if the data have already been fetched.
- if(mWriteToCacheState != NOT_WRITE)
- {
- mUrl.clear();
- }
+
mLoaded = TRUE;
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);