diff options
author | Justin Clarke Casey | 2008-02-08 23:42:19 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-02-08 23:42:19 +0000 |
commit | 16f8f19a541ab2b32751dbc4307efe419443988a (patch) | |
tree | 2b67361b498ea8b484447c365123406843d6e7d9 /OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs | |
parent | * Added Taper support to the Meshmerizer for Cube and Cylinder. (diff) | |
download | opensim-SC-16f8f19a541ab2b32751dbc4307efe419443988a.zip opensim-SC-16f8f19a541ab2b32751dbc4307efe419443988a.tar.gz opensim-SC-16f8f19a541ab2b32751dbc4307efe419443988a.tar.bz2 opensim-SC-16f8f19a541ab2b32751dbc4307efe419443988a.tar.xz |
* Stop asset transactions hanging around after they've completed
* Still not enough to solve the memory leak, though hopefully this is another step on the path
* All these changes are pretty temporary - this will be addressed with a more fundamental refactor in the future
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs b/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs index c9c9541..b458b18 100644 --- a/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs +++ b/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs | |||
@@ -25,13 +25,19 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | |||
29 | using System; | ||
28 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | |||
29 | using libsecondlife; | 32 | using libsecondlife; |
30 | 33 | ||
31 | namespace OpenSim.Framework.Communications.Cache | 34 | namespace OpenSim.Framework.Communications.Cache |
32 | { | 35 | { |
33 | public class AssetTransactionManager | 36 | public class AssetTransactionManager |
34 | { | 37 | { |
38 | private static readonly log4net.ILog m_log | ||
39 | = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
40 | |||
35 | // Fields | 41 | // Fields |
36 | public CommunicationsManager CommsManager; | 42 | public CommunicationsManager CommsManager; |
37 | 43 | ||
@@ -92,7 +98,17 @@ namespace OpenSim.Framework.Communications.Cache | |||
92 | AgentAssetTransactions.AssetXferUploader uploader = transactions.RequestXferUploader(transaction); | 98 | AgentAssetTransactions.AssetXferUploader uploader = transactions.RequestXferUploader(transaction); |
93 | if (uploader != null) | 99 | if (uploader != null) |
94 | { | 100 | { |
95 | uploader.Initialise(remoteClient, assetID, transaction, type, data, storeLocal, tempFile); | 101 | // Upload has already compelted uploading... |
102 | if (uploader.Initialise(remoteClient, assetID, transaction, type, data, storeLocal, tempFile)) | ||
103 | { | ||
104 | lock (transactions.XferUploaders) | ||
105 | { | ||
106 | // XXX Weak ass way of doing this by directly manipulating this public dictionary, purely temporary | ||
107 | transactions.XferUploaders.Remove(uploader.TransactionID); | ||
108 | |||
109 | m_log.Info(String.Format("[ASSET TRANSACTIONS] Current uploaders: {0}", transactions.XferUploaders.Count)); | ||
110 | } | ||
111 | } | ||
96 | } | 112 | } |
97 | } | 113 | } |
98 | } | 114 | } |
@@ -106,4 +122,4 @@ namespace OpenSim.Framework.Communications.Cache | |||
106 | } | 122 | } |
107 | } | 123 | } |
108 | } | 124 | } |
109 | } \ No newline at end of file | 125 | } |