diff --git a/OpenSim/Framework/Communications/Cache/AgentAssetTransactionsManager.cs b/OpenSim/Framework/Communications/Cache/AgentAssetTransactionsManager.cs index 48b25637ee..82fe4c0ec3 100644 --- a/OpenSim/Framework/Communications/Cache/AgentAssetTransactionsManager.cs +++ b/OpenSim/Framework/Communications/Cache/AgentAssetTransactionsManager.cs @@ -78,9 +78,24 @@ namespace OpenSim.Framework.Communications.Cache = new AgentAssetTransactions(userID, this, m_dumpAssetsToFile); AgentTransactions.Add(userID, transactions); } - } + + return AgentTransactions[userID]; + } + } + + /// + /// Remove the given agent asset transactions. This should be called when a client is departing + /// from a scene (and hence won't be making any more transactions here). + /// + /// + public void RemoveAgentAssetTransactions(LLUUID userID) + { + m_log.DebugFormat("Removing agent asset transactions structure for agent {0}", userID); - return AgentTransactions[userID]; + lock (AgentTransactions) + { + AgentTransactions.Remove(userID); + } } /// diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 62437cf54b..d763d35e8b 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -1466,6 +1466,8 @@ namespace OpenSim.Region.Environment.Scenes ForEachScenePresence( delegate(ScenePresence presence) { presence.CoarseLocationChange(); }); + + CommsManager.TransactionsManager.RemoveAgentAssetTransactions(agentID); lock (m_scenePresences) {