Merge remote-tracking branch 'Aleric/master' into Cupcake
This commit is contained in:
@@ -1351,17 +1351,17 @@ void AIMeshUpload::initialize_impl()
|
||||
set_state(AIMeshUpload_start);
|
||||
}
|
||||
|
||||
void AIMeshUpload::multiplex_impl()
|
||||
void AIMeshUpload::multiplex_impl(state_type run_state)
|
||||
{
|
||||
switch (mRunState)
|
||||
switch (run_state)
|
||||
{
|
||||
case AIMeshUpload_start:
|
||||
mMeshUpload.run(this, AIMeshUpload_threadFinished);
|
||||
idle(AIMeshUpload_start); // Wait till the thread finished.
|
||||
idle(); // Wait till the thread finished.
|
||||
break;
|
||||
case AIMeshUpload_threadFinished:
|
||||
mMeshUpload->postRequest(mWholeModelUploadURL, this);
|
||||
idle(AIMeshUpload_threadFinished); // Wait till the responder finished.
|
||||
idle(); // Wait till the responder finished.
|
||||
break;
|
||||
case AIMeshUpload_responderFinished:
|
||||
finish();
|
||||
@@ -1402,14 +1402,6 @@ void LLMeshUploadThread::postRequest(std::string& whole_model_upload_url, AIMesh
|
||||
}
|
||||
}
|
||||
|
||||
void AIMeshUpload::abort_impl()
|
||||
{
|
||||
}
|
||||
|
||||
void AIMeshUpload::finish_impl()
|
||||
{
|
||||
}
|
||||
|
||||
void dump_llsd_to_file(const LLSD& content, std::string filename)
|
||||
{
|
||||
if (gSavedSettings.getBOOL("MeshUploadLogXML"))
|
||||
@@ -1788,7 +1780,7 @@ void LLMeshLODResponder::completedRaw(U32 status, const std::string& reason,
|
||||
|
||||
if (data_size < (S32)mRequestedBytes)
|
||||
{
|
||||
if (status == 499 || status == 503)
|
||||
if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE)
|
||||
{ //timeout or service unavailable, try again
|
||||
LLMeshRepository::sHTTPRetryCount++;
|
||||
gMeshRepo.mThread->loadMeshLOD(mMeshParams, mLOD);
|
||||
@@ -1842,7 +1834,7 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason
|
||||
|
||||
if (data_size < (S32)mRequestedBytes)
|
||||
{
|
||||
if (status == 499 || status == 503)
|
||||
if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE)
|
||||
{ //timeout or service unavailable, try again
|
||||
LLMeshRepository::sHTTPRetryCount++;
|
||||
gMeshRepo.mThread->loadMeshSkinInfo(mMeshID);
|
||||
@@ -1896,7 +1888,7 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r
|
||||
|
||||
if (data_size < (S32)mRequestedBytes)
|
||||
{
|
||||
if (status == 499 || status == 503)
|
||||
if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE)
|
||||
{ //timeout or service unavailable, try again
|
||||
LLMeshRepository::sHTTPRetryCount++;
|
||||
gMeshRepo.mThread->loadMeshDecomposition(mMeshID);
|
||||
@@ -1950,7 +1942,7 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re
|
||||
|
||||
if (data_size < (S32)mRequestedBytes)
|
||||
{
|
||||
if (status == 499 || status == 503)
|
||||
if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE)
|
||||
{ //timeout or service unavailable, try again
|
||||
LLMeshRepository::sHTTPRetryCount++;
|
||||
gMeshRepo.mThread->loadMeshPhysicsShape(mMeshID);
|
||||
@@ -2001,13 +1993,13 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason,
|
||||
// << "Header responder failed with status: "
|
||||
// << status << ": " << reason << llendl;
|
||||
|
||||
// 503 (service unavailable) or 499 (timeout)
|
||||
// HTTP_SERVICE_UNAVAILABLE (503) or HTTP_INTERNAL_ERROR_*'s.
|
||||
// can be due to server load and can be retried
|
||||
|
||||
// TODO*: Add maximum retry logic, exponential backoff
|
||||
// and (somewhat more optional than the others) retries
|
||||
// again after some set period of time
|
||||
if (status == 503 || status == 499)
|
||||
if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE)
|
||||
{ //retry
|
||||
LLMeshRepository::sHTTPRetryCount++;
|
||||
LLMeshRepoThread::HeaderRequest req(mMeshParams);
|
||||
|
||||
Reference in New Issue
Block a user