Fixed test for detecting when user is no longer in sim.

arthursv
Diva Canto 2009-08-11 12:55:46 -07:00
parent 08544e576d
commit bf3f376b10
1 changed files with 5 additions and 3 deletions

View File

@ -73,14 +73,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
foreach (Scene s in m_Scenes) foreach (Scene s in m_Scenes)
{ {
s.TryGetAvatar(clientID, out sp); s.TryGetAvatar(clientID, out sp);
if (sp != null) if ((sp != null) && !sp.IsChildAgent)
{ {
m_log.DebugFormat("[INVENTORY CACHE]: OnClientClosed, but user {0} still in sim. Keeping system folders in cache", clientID); m_log.DebugFormat("[INVENTORY CACHE]: OnClientClosed in {0}, but user {1} still in sim. Keeping system folders in cache",
scene.RegionInfo.RegionName, clientID);
return; return;
} }
} }
m_log.DebugFormat("[INVENTORY CACHE]: OnClientClosed, user {0} out of sim. Dropping system folders", clientID); m_log.DebugFormat("[INVENTORY CACHE]: OnClientClosed in {0}, user {1} out of sim. Dropping system folders",
scene.RegionInfo.RegionName, clientID);
// Drop system folders // Drop system folders
lock (m_InventoryCache) lock (m_InventoryCache)
if (m_InventoryCache.ContainsKey(clientID)) if (m_InventoryCache.ContainsKey(clientID))