aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs29
1 files changed, 27 insertions, 2 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index 6b09e01..7995841 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -355,11 +355,36 @@ namespace OpenSim.Framework.Communications.Cache
355 if ((fold = libraryRoot.HasSubFolder(folderID)) != null) 355 if ((fold = libraryRoot.HasSubFolder(folderID)) != null)
356 { 356 {
357 return fold.RequestListOfItems(); 357 return fold.RequestListOfItems();
358 } 358 }
359 359
360 CachedUserInfo userProfile; 360 CachedUserInfo userProfile;
361 if (m_userProfiles.TryGetValue(agentID, out userProfile)) 361 if (m_userProfiles.TryGetValue(agentID, out userProfile))
362 { 362 {
363 // XXX: When a client crosses into a scene, their entire inventory is fetched
364 // asynchronously. If the client makes a request before the inventory is received, we need
365 // to give the inventory a chance to come in.
366 //
367 // This is a crude way of dealing with that by retrying the lookup. It's not quite as bad
368 // in CAPS as doing this with the udp request, since here it won't hold up other packets.
369 // In fact, here we'll be generous and try for longer.
370 if (!userProfile.HasInventory)
371 {
372 int attempts = 0;
373 while (attempts++ < 20)
374 {
375 m_log.DebugFormat(
376 "[INVENTORY CACHE]: Poll number {0} for inventory items in folder {1} for user {2}",
377 attempts, folderID, agentID);
378
379 Thread.Sleep(3000);
380
381 if (userProfile.HasInventory)
382 {
383 break;
384 }
385 }
386 }
387
363 if (userProfile.HasInventory) 388 if (userProfile.HasInventory)
364 { 389 {
365 if (userProfile.RootFolder.ID == folderID) 390 if (userProfile.RootFolder.ID == folderID)