mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Attempt to fix mantis issue # 65, seems like it is a race condition between two regions trying to add a user to the AssetTransactionManager at the same time. So have placed a lock around the Dictionary add.
This commit is contained in:
@@ -49,11 +49,14 @@ namespace OpenSim.Framework.Communications.Cache
|
||||
// Methods
|
||||
public AgentAssetTransactions AddUser(LLUUID userID)
|
||||
{
|
||||
if (!AgentTransactions.ContainsKey(userID))
|
||||
lock (AgentTransactions)
|
||||
{
|
||||
AgentAssetTransactions transactions = new AgentAssetTransactions(userID, this, m_dumpAssetsToFile);
|
||||
AgentTransactions.Add(userID, transactions);
|
||||
return transactions;
|
||||
if (!AgentTransactions.ContainsKey(userID))
|
||||
{
|
||||
AgentAssetTransactions transactions = new AgentAssetTransactions(userID, this, m_dumpAssetsToFile);
|
||||
AgentTransactions.Add(userID, transactions);
|
||||
return transactions;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user