From 6866900e9267fd9d2b694e3d68187d4bb0162424 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Sun, 21 Nov 2010 00:09:33 -0600 Subject: 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. --- indra/newview/llmeshrepository.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'indra') 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; } } } -- cgit v1.2.3