diff options
author | Dave Parks <davep@lindenlab.com> | 2010-11-21 00:09:33 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-11-21 00:09:33 -0600 |
commit | 6866900e9267fd9d2b694e3d68187d4bb0162424 (patch) | |
tree | 37de8c1178b09bc00babf52b6b36d5687f310e06 | |
parent | 8f50486dd97eb3143d2d31531eda440e71df5f51 (diff) |
Fix for crash when uploading textures via importer. Uploads still fail, though, fix just makes them stop trying after 5 retries when getting 499 or 500 status codes.
-rwxr-xr-x | indra/newview/llmeshrepository.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 2f432ba0be..1ff11f2c01 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -80,6 +80,8 @@ U32 LLMeshRepository::sCacheBytesWritten = 0; U32 LLMeshRepository::sPeakKbps = 0; +const U32 MAX_TEXTURE_UPLOAD_RETRIES = 5; + std::string header_lod[] = { "lowest_lod", @@ -245,15 +247,23 @@ public: else { llwarns << status << ": " << reason << llendl; - llwarns << "Retrying. (" << ++mData.mRetries << ")" << llendl; - - if (status == 499) + + if (mData.mRetries < MAX_TEXTURE_UPLOAD_RETRIES) { - mThread->uploadTexture(mData); + llwarns << "Retrying. (" << ++mData.mRetries << ")" << llendl; + + if (status == 499 || status == 500) + { + mThread->uploadTexture(mData); + } + else + { + llerrs << "Unhandled status " << status << llendl; + } } else - { - llerrs << "Unhandled status " << status << llendl; + { + llwarns << "Giving up after " << mData.mRetries << " retries." << llendl; } } } |