From ccc90257e7622bcf35454e8d4a0780f020ee6c39 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Thu, 21 Jan 2010 15:57:06 -0500
Subject: [PATCH] For EXT-4222: Switching outfits sometimes causes me to wear
 both, and show previous outfit as worn.

---
 indra/newview/llappearancemgr.cpp | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 6972d4ec983..61d60fdff96 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -322,7 +322,15 @@ LLWearableHoldingPattern::~LLWearableHoldingPattern()
 
 bool LLWearableHoldingPattern::isDone()
 {
-	return (mResolved >= (S32)mFoundList.size());
+	if (mResolved >= (S32)mFoundList.size())
+		return true; // have everything we were waiting for
+	else if (isTimedOut())
+	{
+		llwarns << "Exceeded max wait time, updating appearance based on what has arrived" << llendl;
+		return true;
+	}
+	return false;
+
 }
 
 bool LLWearableHoldingPattern::isTimedOut()
@@ -369,16 +377,8 @@ bool LLWearableHoldingPattern::pollCompletion()
 		}
 
 		delete this;
-		return done;
 	}
-	else if (isTimedOut())
-	{
-		llwarns << "wearables taking too long to fetch for outfit, retrying updateAppearanceFromCOF()." << llendl;
-		delete this;
-		LLAppearanceManager::instance().updateAppearanceFromCOF();
-		return true;
-	}
-	return false;
+	return done;
 }
 
 static void removeDuplicateItems(LLInventoryModel::item_array_t& items)
-- 
GitLab